コード例 #1
0
ファイル: ReportBuilder.cs プロジェクト: xoposhiy/KOIB
        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;
        }