Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            Sales_Report rpt = new Sales_Report();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        protected void btnShowSales_Click(object sender, EventArgs e)
        {
            Models.ReportTableAdapters.DataTable2TableAdapter da = new Models.ReportTableAdapters.DataTable2TableAdapter();
            Models.Report ds = new Models.Report();
            Models.Report.DataTable2DataTable dt = (Models.Report.DataTable2DataTable)ds.Tables["DataTable2"];
            da.Fill(dt);

            Sales_Report rpt = new Sales_Report();

            rpt.SetDataSource(ds);
            CrystalReportViewer1.ReportSource = rpt;
            Session.Add("report1", rpt);
        }