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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void WithoutCost_Click(object sender, EventArgs e)
        {
            DataSet dataSetReport = new DataSet();

            BoughtLeafBusinessLayer.BLSupplier myAccount = new BoughtLeafBusinessLayer.BLSupplier();
            dataSetReport = myAccount.TransportCodeWiseSuppliersWithouCost(Convert.ToInt32(cmbMonth.SelectedValue.ToString()), Convert.ToInt32(cmbYear.Text));

            dataSetReport.WriteXml("trnCodeWithout.xml");

            TransportCodeWiseWithoutCostRPT myaclist = new TransportCodeWiseWithoutCostRPT();

            myaclist.SetDataSource(dataSetReport);
            ReportViewer myReportViewer = new ReportViewer();

            myaclist.SetParameterValue("Company", BoughtLeafBusinessLayer.BLUser.getCompanyName());
            myaclist.SetParameterValue("Month", cmbMonth.Text);
            myaclist.SetParameterValue("Year", cmbYear.Text);
            myReportViewer.crystalReportViewer1.ReportSource = myaclist;
            myReportViewer.Show();
        }