Exemple #1
0
        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);
            }
        }
Exemple #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            PlacementByLabourer rpt = new PlacementByLabourer();

            rpt.Site = this.Site;
            return(rpt);
        }