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

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void btnNortifications_Click(object sender, EventArgs e)
        {
            DataSet dataSetReport = new DataSet();

            dataSetReport = myEmployee.ListEmployeesAboveToRetire();
            dataSetReport.WriteXml("EmployeesAboveToRetire.xml");

            if (dataSetReport.Tables[0].Rows.Count > 0)
            {
                EmployesAboveToRetireRPT myaclist = new EmployesAboveToRetireRPT();
                myaclist.SetDataSource(dataSetReport);
                ReportViewer myReportViewer = new ReportViewer();

                myaclist.SetParameterValue("Estate", myDivision.ListEstates().Rows[0][0].ToString() + " Estate");
                myaclist.SetParameterValue("Company", FTSPayRollBL.Company.getCompanyName());
                myReportViewer.crystalReportViewer1.ReportSource = myaclist;
                myReportViewer.Show();
            }
            else
            {
                MessageBox.Show("No Data to preview..!");
            }
        }