Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            DivisionWiseEPFETFSummaryRPT rpt = new DivisionWiseEPFETFSummaryRPT();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void cmdDisplay1_Click(object sender, EventArgs e)
        {
            DataSet dataSetReport = new DataSet();

            dataSetReport = myReports.getDivisionWiseEPFETFSummary(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString()));

            if (dataSetReport.Tables[0].Rows.Count > 0)
            {
                dataSetReport.WriteXml("EPFETFSummary.xml");
                DivisionWiseEPFETFSummaryRPT myaclist = new DivisionWiseEPFETFSummaryRPT();
                myaclist.SetDataSource(dataSetReport);
                ReportViewer myReportViewer = new ReportViewer();

                myaclist.SetParameterValue("CompanyName", FTSPayRollBL.Company.getCompanyName());
                myaclist.SetParameterValue("Estate", mydiv.ListEstates().Rows[0][0].ToString());
                myaclist.SetParameterValue("Period", "Month of : " + cmbMonth.Text + "/" + cmbYear.Text);
                myReportViewer.crystalReportViewer1.ReportSource = myaclist;
                myReportViewer.Show();
            }
            else
            {
                MessageBox.Show("No Data to preview..!");
            }
        }