コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptEmpTotAttendance rpt = new rptEmpTotAttendance();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void btattendencestatus_Click(object sender, EventArgs e)
        {
            rptEmpTotAttendance    oRpt = new rptEmpTotAttendance();
            ParameterFields        ps   = new ParameterFields();
            ParameterField         p    = new ParameterField();
            ParameterDiscreteValue pdc  = new ParameterDiscreteValue();

            SetDBLogonForReport(oRpt);
            p.Name    = "@empid";
            pdc.Value = cmbemp.SelectedValue;
            p.CurrentValues.Add(pdc);
            ps.Add(p);
            crystalReportViewer1.ParameterFieldInfo = ps;
            crystalReportViewer1.ReportSource       = oRpt;
            crystalReportViewer1.Show();
        }