Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AttenreporCrystal rpt = new AttenreporCrystal();

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        private void AttenreporCrystalForm_Load(object sender, EventArgs e)
        {
            switch (this.printclass)
            {
            case 1:
                DataTable dt = _ds;
                dt.TableName = "attentreport";
                AttenreporCrystal attenreport = new AttenreporCrystal();
                attenreport.SetDataSource(_ds);
                attenreport.SetParameterValue("Search_DateTime", _date.ToString("yyyy年MM月"));
                attenreport.SetParameterValue("EmployeeName", "---" + _employee.EmployeeName + "出勤記錄");
                crv_attenreport.ReportSource = attenreport;
                break;

            case 2:
                AnormalySalaryCrystal anormalyCry = new AnormalySalaryCrystal();
                anormalyCry.SetDataSource(this._anormalyDS);
                anormalyCry.SetParameterValue("AnormalyReportDate", this._anormalyDateTime.ToString("yyyy年MM月"));
                anormalyCry.SetParameterValue("PrintDate", DateTime.Now.ToString("yyyy-MM-dd"));
                crv_attenreport.ReportSource = anormalyCry;
                break;
            }
        }