Beispiel #1
0
 public PrinterJob BuildReport(ReportType reportType, ListDictionary parameters, int copies)
 {
     var pdfBuilder = new PdfReportBuilder();
     var reportParameters = new ListDictionary();
     reportParameters[PRN_REPORT_NAME] = reportType;
     foreach (string key in parameters.Keys)
     {
         reportParameters[key] = parameters[key];
     }
     var reportDesc = _reportMap[(int)reportType];
     return reportDesc.Builder(pdfBuilder, reportParameters, copies, reportDesc.Prolog, reportDesc.Epilog);
 }
Beispiel #2
0
        public PrinterJob BuildReport(ReportType reportType, ListDictionary parameters, int copies)
        {
            var pdfBuilder       = new PdfReportBuilder();
            var reportParameters = new ListDictionary();

            reportParameters[PRN_REPORT_NAME] = reportType;
            foreach (string key in parameters.Keys)
            {
                reportParameters[key] = parameters[key];
            }
            var reportDesc = _reportMap[(int)reportType];

            return(reportDesc.Builder(pdfBuilder, reportParameters, copies, reportDesc.Prolog, reportDesc.Epilog));
        }
Beispiel #3
0
 private PrinterJob GenericPrintThread(
     PdfReportBuilder report,
     ListDictionary reportParameters,
     int copies,
     PrologEpilogDelegate prolog,
     PrologEpilogDelegate epilog)
 {
     lock (s_buildReportSync)
     {
         prolog(reportParameters);
         PrepareReport((ReportType)reportParameters[PRN_REPORT_NAME], report, reportParameters);
         var job = report.Build((ReportType)reportParameters[PRN_REPORT_NAME], copies);
         epilog(reportParameters);
         return(job);
     }
 }
Beispiel #4
0
        private void PrepareReport(ReportType reportType, PdfReportBuilder pdfBuilder, ListDictionary reportParameters)
        {
            var template = ReportTemplate.LoadTemplate(reportType, _printingManager.Logger);

            if (reportType == ReportType.ElectionProtocol || reportType == ReportType.PreliminaryElectionProtocol)
            {
                ApplySourceDataTemplate(reportType, reportParameters, template);
            }
            template.LoadParameters(reportParameters);
            pdfBuilder.Headers[PageSection.Header]     = ReportTemplate.ConstructHeader(template.Header);
            pdfBuilder.Headers[PageSection.PageHeader] = ReportTemplate.ConstructHeader(template.PageHeader);
            pdfBuilder.Headers[PageSection.Footer]     = ReportTemplate.ConstructHeader(template.Footer);
            pdfBuilder.Headers[PageSection.PageFooter] = ReportTemplate.ConstructHeader(template.PageFooter);
            pdfBuilder.Data         = template.PrepareTable();
            pdfBuilder.TemplateFont = template.Font;
            pdfBuilder.FontSize     = template.FontSize;
            pdfBuilder.Margins      = template.Margins;
            pdfBuilder.ClaspFooter  = template.ClaspFooter;
            pdfBuilder.PageNumbered = template.PageNumbered;
        }
Beispiel #5
0
 private void PrepareReport(ReportType reportType, PdfReportBuilder pdfBuilder, ListDictionary reportParameters)
 {
     var template = ReportTemplate.LoadTemplate(reportType, _printingManager.Logger);
     if (reportType == ReportType.ElectionProtocol || reportType == ReportType.PreliminaryElectionProtocol)
         ApplySourceDataTemplate(reportType, reportParameters, template);
     template.LoadParameters(reportParameters);
     pdfBuilder.Headers[PageSection.Header] = ReportTemplate.ConstructHeader(template.Header);
     pdfBuilder.Headers[PageSection.PageHeader] = ReportTemplate.ConstructHeader(template.PageHeader);
     pdfBuilder.Headers[PageSection.Footer] = ReportTemplate.ConstructHeader(template.Footer);
     pdfBuilder.Headers[PageSection.PageFooter] = ReportTemplate.ConstructHeader(template.PageFooter);
     pdfBuilder.Data = template.PrepareTable();
     pdfBuilder.TemplateFont = template.Font;
     pdfBuilder.FontSize = template.FontSize;
     pdfBuilder.Margins = template.Margins;
     pdfBuilder.ClaspFooter = template.ClaspFooter;
     pdfBuilder.PageNumbered = template.PageNumbered;
 }
Beispiel #6
0
 private PrinterJob GenericPrintThread( 
     PdfReportBuilder report, 
     ListDictionary reportParameters, 
     int copies, 
     PrologEpilogDelegate prolog, 
     PrologEpilogDelegate epilog)
 {
     lock (s_buildReportSync)
     {
         prolog(reportParameters);
         PrepareReport((ReportType)reportParameters[PRN_REPORT_NAME], report, reportParameters);
         var job = report.Build((ReportType)reportParameters[PRN_REPORT_NAME], copies);
         epilog(reportParameters);
         return job;
     }
 }
Beispiel #7
0
 public PdfEventHelper(PdfReportBuilder reportPrint)
 {
     _reportPrint = reportPrint;
 }
Beispiel #8
0
 public PdfEventHelper(PdfReportBuilder reportPrint)
 {
     _reportPrint = reportPrint;
 }