Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AdvanceOutStandingRPT rpt = new AdvanceOutStandingRPT();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void btnView_Click(object sender, EventArgs e)
        {
            string route = cmbRoute.Text;

            DataSet ds = rptHelp.getAdvancePayment(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue), route);

            ds.WriteXml("AdvanceOutStandValues.xml");

            string CompanyName = rptHelp.getCompanyName();
            string factory     = rptHelp.getFactoryName();

            ReportViewer          viewerRPT = new ReportViewer();
            AdvanceOutStandingRPT myReport  = new AdvanceOutStandingRPT();

            myReport.SetDataSource(ds);

            myReport.SetParameterValue("Company", CompanyName);
            myReport.SetParameterValue("Year", cmbYear.Text);
            myReport.SetParameterValue("Month", cmbMonth.Text);

            viewerRPT.crystalReportViewer1.ReportSource     = myReport;
            viewerRPT.crystalReportViewer1.DisplayGroupTree = true;
            viewerRPT.Show();
        }