Пример #1
0
        private void SalesSummaryReportForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dataSet2.ProductSalesSummary' table. You can move, or remove it, as needed.
               // DataSet2 dataSet2 = new DataSet2();
               // Vectra.DataSet2TableAdapters.configurationTableAdapter configurationTableAdapter1 = new Vectra.DataSet2TableAdapters.configurationTableAdapter();
               // Vectra.DataSet2TableAdapters.ProductSalesSummaryTableAdapter ProductSalesSummaryTableAdapter1 = new Vectra.DataSet2TableAdapters.ProductSalesSummaryTableAdapter();
            runCreateSummaryTable();

            ReportDocument cryRpt;

            configurationTableAdapter1.Fill(this.dataSet2.configuration);
            productSalesSummaryTableAdapter.Fill(this.dataSet2.ProductSalesSummary);

            SalesSummaryReport rpt = new SalesSummaryReport();
            rpt.SetDataSource(dataSet2);

            cryRpt = new ReportDocument();
            cryRpt.Load(rpt.FileName.ToString());
            cryRpt.SetDataSource(dataSet2);
            cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, ReportFolder.reportFolderName + @"\ProductSalesSummary.pdf");
        }
Пример #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     SalesSummaryReport rpt = new SalesSummaryReport();
     rpt.Site = this.Site;
     return rpt;
 }