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

            rpt.Site = this.Site;
            return(rpt);
        }
        private ReportDocument getReportDocument(Dictionary <String, Object> param, String printouttype)
        {
            ReportDocument rviewer = new ReportDocument();

            rviewer = new crtDelStatusReport();
            rviewer.SetDataSource(printableData["main"]);
            rviewer.SetParameterValue("nooftrips", param["nooftrips"]);
            rviewer.SetParameterValue("nooftripsweek", param["nooftripsweek"]);
            rviewer.SetParameterValue("datefrom", param["datefrom"]);
            rviewer.SetParameterValue("dateto", param["dateto"]);
            rviewer.SetParameterValue("totalinvoicevaluemtd", param["invoicevalue_mtd"]);
            rviewer.SetParameterValue("totalinvoicevalueytd", param["invoicevalue_ytd"]);
            rviewer.SetParameterValue("hired", param["hired"]);
            rviewer.SetParameterValue("commute", param["commute"]);
            rviewer.SetParameterValue("owned", param["owned"]);
            rviewer.SetParameterValue("amounthired", param["amounthired"]);
            rviewer.SetParameterValue("amountcommute", param["amountcommute"]);
            rviewer.SetParameterValue("amountowned", param["amountowned"]);
            rviewer.SetParameterValue("hireweek", param["hiredweek"]);
            rviewer.SetParameterValue("commuteweek", param["commuteweek"]);
            rviewer.SetParameterValue("ownweek", param["ownweek"]);
            rviewer.SetParameterValue("amounthiredweek", param["amounthiredweek"]);
            rviewer.SetParameterValue("amountcommuteweek", param["amountcommuteweek"]);
            rviewer.SetParameterValue("totaltripdelivered", param["totaltripdelivered"]);
            rviewer.SetParameterValue("totaltripundelivered", param["totaltripundelivered"]);
            rviewer.SetParameterValue("nooftripsdelweek", param["nooftripsdelweek"]);
            rviewer.SetParameterValue("nooftripsundelweek", param["nooftripsundelweek"]);
            rviewer.SetParameterValue("totalothertruckweek", param["totalothertruckweek"]);
            rviewer.SetParameterValue("totalothertruck", param["totalothertruck"]);
            rviewer.SetParameterValue("totalvehlused", param["totalvehlused"]);
            rviewer.SetParameterValue("totalvehlusedweek", param["totalvehlusedweek"]);
            rviewer.SetParameterValue("allinvoicemonth", param["allinvoicemonth"]);
            rviewer.SetParameterValue("monthname", param["monthname"]);
            rviewer.SetParameterValue("branchname", Utils.branchcode);
            return(rviewer);
        }