Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptMonthAttendnceSummery rpt = new rptMonthAttendnceSummery();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void btnSum_Click(object sender, EventArgs e)
        {
            rptMonthAttendnceSummery oRpt = new rptMonthAttendnceSummery();
            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();
        }