Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["value"] == "AllEmployeeReport")
     {
         AllEmployeeReport rpt = new AllEmployeeReport();
         rpt.SetDataSource(db.Employees.ToList());
         CrystalReportViewer1.ReportSource = rpt;
     }
     else if (Request.QueryString["value"] == "EmployeeDatewise")
     {
         EmployeeDatewise rpt = new EmployeeDatewise();
         rpt.SetDataSource(db.Employees.ToList());
         CrystalReportViewer1.ReportSource = rpt;
     }
     else if (Request.QueryString["value"] == "EmployeeSalarywise")
     {
         EmployeeSalarywise rpt = new EmployeeSalarywise();
         rpt.SetDataSource(db.Employees.ToList());
         CrystalReportViewer1.ReportSource = rpt;
     }
     else if (Request.QueryString["value"] == "IndividualReport" && Request.QueryString["E_id"] != null)
     {
         IndivdualReport rpt = new IndivdualReport();
         int             id  = Convert.ToInt32(Request.QueryString["E_id"]);
         rpt.SetDataSource(db.Employees.Where(m => m.Employee_id == id).ToList());
         CrystalReportViewer1.ReportSource = rpt;
     }
     else
     {
         CrystalReportViewer1.ReportSource = null;
         CrystalReportViewer1.Visible      = false;
     }
 }
Esempio n. 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            EmployeeDatewise rpt = new EmployeeDatewise();

            rpt.Site = this.Site;
            return(rpt);
        }