Пример #1
0
        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);
            }
        }
Пример #2
0
 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;
 }
Пример #3
0
        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);
        }
Пример #4
0
 public ReportGenerator(UC_NewLog parent, ReportTab reportTab)
 {
     this.parent    = parent;
     this.reportTab = reportTab;
 }