public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptCheckDaily rpt = new rptCheckDaily(); rpt.Site = this.Site; return(rpt); }
private void label9_Click(object sender, EventArgs e) { //ATM REPORT CrystalDecisions.Shared.TableLogOnInfo li; //Print Purposes using (SqlConnection con = new SqlConnection(global.connectString())) { con.Open(); SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM vw_SavingsReportDailyCheck", con); DataTable dt = new DataTable(); DataSet ds = new DataSet(); ReportsForms.rptCheckDaily cr = new ReportsForms.rptCheckDaily(); ReportsForms.rptSavingsWithdrawalDaily rpt = new ReportsForms.rptSavingsWithdrawalDaily(); li = new TableLogOnInfo(); li.ConnectionInfo.IntegratedSecurity = false; adapter.Fill(ds, "vw_SavingsReportDailyCheck"); dt = ds.Tables["vw_SavingsReportDailyCheck"]; cr.SetDataSource(ds.Tables["vw_SavingsReportDailyCheck"]); //cr.SetDatabaseLogon("sa", "SYSADMIN", "192.168.255.176", "PECCI-NEW"); cr.SetDatabaseLogon(global.username, global.pass, global.datasource, global.initialCatalog); rpt.crystalReportViewer1.ReportSource = cr; rpt.crystalReportViewer1.RefreshReport(); rpt.ShowDialog(); } }