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

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            DataSet1   ds  = new DataSet1();
            SqlCommand cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select * from issue_books where book_return_date = ''";
            cmd.ExecuteNonQuery();
            DataTable      dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(ds.DataTable1);
            CrystalReport1 myreport = new CrystalReport1();

            myreport.SetDataSource(ds);
            crystalReportViewer1.ReportSource = myreport;
        }
Esempio n. 3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     cr = new CrystalReport1();
 }