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

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void genReportB_Click(object sender, EventArgs e)
        {
            DataSet3Books ds  = new DataSet3Books();
            SqlCommand    cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select * from books_info ";
            cmd.ExecuteNonQuery();
            DataTable      dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(ds.DataTableBooks);
            CrystalReportAllBook myreport = new CrystalReportAllBook();

            myreport.SetDataSource(ds);
            crystalReportViewerAllBooks.ReportSource = myreport;
        }