public void StartCreatePDFReport(Classes.ReportTab rd) { generator = new ReportGenerator(this, rd); Cursor = Cursors.WaitCursor; rd.AddAttachmentsToReport(ref generator); if (myReportFormData.customLogoPath != null) { generator.NewCustomerLogo(myReportFormData.customLogoPath); } if (myReportFormData.chk_PieChart_Checked || myReportFormData.chk_RowChart_Checked) { rd.paintChartsForm = new Forms.PaintCharts(this, mySummary); rd.paintChartsForm.Show(); //After the paintForm is showned it will draw charts and then set UC_NewLog property PaintFormCompleted, //this will in turn call function paintChartFormDone(); } else { GenerateReport(ref rd); } }
private void GenerateReport(ref Classes.ReportTab rd) { if (rd.saveReportFilePath != null && myReportFormData != null) { var filepath = generator.Generate(rd.saveReportFilePath); Process.Start(filepath); } Cursor = Cursors.Default; }
private void paintChartFormDone(ref Classes.ReportGenerator generator, ref Classes.ReportTab rd) { if (rowChart != null) { generator.rowChart = (Image)BitmapFromChart(rowChart); } if (pieChart != null) { generator.pieChart = (Image)BitmapFromChart(pieChart); } rd.paintChartsForm.Close(); rd.paintChartsForm.Dispose(); GenerateReport(ref rd); }
public ReportGenerator(UC_NewLog parent, ReportTab reportTab) { this.parent = parent; this.reportTab = reportTab; }