public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport1 rpt = new CrystalReport1();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet1 ds = new DataSet1();

            DataSet1TableAdapters.categoriesTableAdapter da = new DataSet1TableAdapters.categoriesTableAdapter();
            DataSet1.categoriesDataTable dt = (DataSet1.categoriesDataTable)ds.Tables["categories"];
            da.Fill(dt);
            DataSet1TableAdapters.productsTableAdapter da1 = new DataSet1TableAdapters.productsTableAdapter();
            DataSet1.productsDataTable dt1 = (DataSet1.productsDataTable)ds.Tables["products"];
            da1.Fill(dt1);
            CrystalReport1 rpt = new CrystalReport1();

            rpt.SetDataSource(ds);
            //rpt.Refresh();

            this.CrystalReportViewer1.ReportSource = rpt;
        }