private void LoadPrintableReports() {//EMthod to add data to the request table,it also avoids the database loginig in prompt try { ReportsRequest reportJobRequests = new ReportsRequest(); ProfitableClientsReport profitableClientsReport = new ProfitableClientsReport(); PlacementByLabourer placementByLabourerReport = new PlacementByLabourer(); HghlyRqstdCtgryRprt hghlyRqstdCtgryReport = new HghlyRqstdCtgryRprt(); reportJobRequests.SetDatabaseLogon($"{Database.serverLoginName}", $"{Database.serverLoginPass}", $"{Database.serverName}", $"{Database.databaseName}"); profitableClientsReport.SetDatabaseLogon($"{Database.serverLoginName}", $"{Database.serverLoginPass}", $"{Database.serverName}", $"{Database.databaseName}"); placementByLabourerReport.SetDatabaseLogon($"{Database.serverLoginName}", $"{Database.serverLoginPass}", $"{Database.serverName}", $"{Database.databaseName}"); hghlyRqstdCtgryReport.SetDatabaseLogon($"{Database.serverLoginName}", $"{Database.serverLoginPass}", $"{Database.serverName}", $"{Database.databaseName}"); // reportJobRequests.Load(@"C:\Users\T4NY4\source\repos\iJob2019\PROJECT BACKUP\iJob2019 08_05_2019\ReportJobRequests.rpt"); reportViewerJobR.ReportSource = reportJobRequests; reportViewerJobR.Refresh(); JobPlacementRprtVwr.ReportSource = placementByLabourerReport; JobPlacementRprtVwr.Refresh(); ProfitabelClientViewer2.ReportSource = profitableClientsReport; ProfitabelClientViewer2.Refresh(); RqstPerLabourersReportViewer.ReportSource = hghlyRqstdCtgryReport; RqstPerLabourersReportViewer.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportsRequest rpt = new ReportsRequest(); rpt.Site = this.Site; return(rpt); }
private void loadRequestReport() { ReportsRequest reportJobRequests = new ReportsRequest(); reportJobRequests.SetDatabaseLogon("ijob", "Tanya@dodger12", "ijobsrvr.database.windows.net", "iJobDatabase"); // reportJobRequests.Load(@"C:\Users\T4NY4\source\repos\iJob2019\PROJECT BACKUP\iJob2019 08_05_2019\ReportJobRequests.rpt"); reportViewerJobR.ReportSource = reportJobRequests; reportViewerJobR.Refresh(); }