コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrpSalesmanSaleSummary rpt = new CrpSalesmanSaleSummary();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: RptReportViewer.cs プロジェクト: saqibsoft/SoftGrow
 public void SalesmanSale(string criteria, DataTable dt, bool vLetterHead = false, bool vSummary = false)
 {
     try
     {
         objDAL.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString;
         DataTable dt1 = objDAL.getCompanyInfo();
         if (vLetterHead)
         {
             CrpPartyWiseSaleLH Rpt = new CrpPartyWiseSaleLH();
             Rpt.Database.Tables[0].SetDataSource(dt);
             Rpt.Database.Tables[1].SetDataSource(dt1);
             Rpt.SummaryInfo.ReportTitle = "PARTY WISE SALE";
             Rpt.SetParameterValue("criteria", criteria);
             this.CRViewer.ReportSource = Rpt;
         }
         else
         {
             if (!vSummary)
             {
                 CrpSalesmanSale Rpt = new CrpSalesmanSale();
                 Rpt.Database.Tables[0].SetDataSource(dt);
                 Rpt.Database.Tables[1].SetDataSource(dt1);
                 Rpt.SummaryInfo.ReportTitle = "SALESMAN SALE";
                 Rpt.SetParameterValue("criteria", criteria);
                 this.CRViewer.ReportSource = Rpt;
             }
             else
             {
                 CrpSalesmanSaleSummary Rpt = new CrpSalesmanSaleSummary();
                 Rpt.Database.Tables[0].SetDataSource(dt);
                 Rpt.Database.Tables[1].SetDataSource(dt1);
                 Rpt.SummaryInfo.ReportTitle = "SALESMAN SALE SUMMARY";
                 Rpt.SetParameterValue("criteria", criteria);
                 this.CRViewer.ReportSource = Rpt;
             }
         }
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message, "Error");
     }
 }