public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptDayAttendanceInMonth rpt = new rptDayAttendanceInMonth(); rpt.Site = this.Site; return(rpt); }
private void btnRegSum_Click(object sender, EventArgs e) { rptDayAttendanceInMonth oRpt = new rptDayAttendanceInMonth(); ParameterFields ps = new ParameterFields(); ParameterField p = new ParameterField(); ParameterDiscreteValue pdc = new ParameterDiscreteValue(); SetDBLogonForReport(oRpt); p.Name = "@month"; pdc.Value = Convert.ToInt32(cmbMonth.SelectedValue); p.CurrentValues.Add(pdc); ps.Add(p); ParameterField p3 = new ParameterField(); ParameterDiscreteValue pdc3 = new ParameterDiscreteValue(); p3.Name = "@comCode"; pdc3.Value = cmbCompany.SelectedValue; p3.CurrentValues.Add(pdc3); ps.Add(p3); crystalReportViewer1.ParameterFieldInfo = ps; crystalReportViewer1.ReportSource = oRpt; crystalReportViewer1.Show(); }