public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AttenreportCrystal3 rpt = new AttenreportCrystal3();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void AttenreportForm2_Load(object sender, EventArgs e)
        {
            ds = hremp.SelectByEmpMonth(_date);
            DataTable dt = ds.Tables[0];

            //DateTime bgdate = Convert.ToDateTime(dt.Rows[0]["ShouldCheckIn"].ToString());
            //DateTime endate = Convert.ToDateTime(dt.Rows[0]["ShouldCheckOut"].ToString());

            dt.TableName = "attentreport";

            CrystalDecisions.Shared.ParameterValues        employeename = new CrystalDecisions.Shared.ParameterValues();
            CrystalDecisions.Shared.ParameterDiscreteValue PDEmployeeId = new CrystalDecisions.Shared.ParameterDiscreteValue();

            //attenreport.SetParameterValue("beginTime", bgdate.ToString("HH:mm"));
            //attenreport.SetParameterValue("toTime", endate.ToString("HH:mm"));

            //CrystalDecisions.Shared.ParameterValues EmployeeName = new CrystalDecisions.Shared.ParameterValues();
            //CrystalDecisions.Shared.ParameterDiscreteValue PDEmployeeID = new CrystalDecisions.Shared.ParameterDiscreteValue();
            //PDEmployeeID.Value = "EmployeeName";
            //EmployeeName.Add(PDEmployeeID);


            if (hasDepartment)
            {
                AttenreportCrystal2 attenreport = new AttenreportCrystal2();
                attenreport.SetDataSource(ds);
                crystalReportViewer1.ReportSource = attenreport;
            }
            else
            {
                AttenreportCrystal3 attenreport = new AttenreportCrystal3();
                attenreport.SetDataSource(ds);
                crystalReportViewer1.ReportSource = attenreport;
            }
        }