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

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
 private void AllStaffReport_Load(object sender, EventArgs e)
 {
     using (con = new SqlConnection(ConStr))
     {
         using (adapter = new SqlDataAdapter("select * from Staff", con))
         {
             dt = new DataTable();
             adapter.Fill(dt);
             AllStaffCrystalReport asr = new AllStaffCrystalReport();
             asr.SetDataSource(dt);
             crystalReportViewer1.ReportSource = asr;
         }
     }
 }