Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            DeliveredOrders rpt = new DeliveredOrders();

            rpt.Site = this.Site;
            return(rpt);
        }
 private void ReportsForm_Load(object sender, EventArgs e)
 {
     if (choice == 0) // delivered orders report
     {
         doe = new DeliveredOrders();
         doe.SetParameterValue(0, Helper.currentUserName);
         crystalReportViewer1.ReportSource = doe;
     }
     else // restaurants report
     {
         roe = new ResaturantFoodReport();
         roe.SetParameterValue(0, restName);
         roe.SetParameterValue(1, restLocation);
         roe.SetParameterValue(2, fromDate);
         roe.SetParameterValue(3, toDate);
         crystalReportViewer1.ReportSource = roe;
     }
     crystalReportViewer1.VerticalScroll.Enabled        = true;
     crystalReportViewer1.ReuseParameterValuesOnRefresh = true;
     crystalReportViewer1.RefreshReport();
 }