コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportBookretain rpt = new CrystalReportBookretain();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void txt_genReport_Click(object sender, EventArgs e)
        {
            DataSet1Br ds  = new DataSet1Br();
            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);
            CrystalReportBookretain myreport = new CrystalReportBookretain();

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