Пример #1
0
 private void frmPurchaseReport_Load(object sender, EventArgs e)
 {
     rptPurchase rp = new rptPurchase();
     rp.Database.Tables[0].ApplyLogOnInfo(log);
     //rp.Load("D:\\StudyRoom\\MyRoom\\RetailStore\\RetailStore\\RetailStore\\Crystal_Reports\\rptPurchase.rpt");
     try
     {
         datasetRetailStore ds = new datasetRetailStore();
         ds.Purchase.Merge(d.dataPurchase());
         rp.Database.Tables[0].SetDataSource(ds);
         crvPurchaseReport.ReportSource=rp;
     }
     catch (OleDbException ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }
Пример #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptPurchase rpt = new rptPurchase();
     rpt.Site = this.Site;
     return rpt;
 }