Exemplo n.º 1
0
        public TableBuilder AddRowData(IChartBuilder chartBuilder, int colSpan = 1, string textAlign = "center")
        {
            var cell = chartBuilder.BuildTableCell();

            cell.TextAlign = textAlign;
            cell.ColSpan   = colSpan;

            return(AddRowData(new List <PdfReportCellModel> {
                cell
            }));
        }
Exemplo n.º 2
0
        public ReportBuilder AddChart(
            IChartBuilder chartBuilder,
            string textAlign             = "center",
            int innerMargins             = 0,
            string innerMarginsDirection = null,
            int outerMargins             = 0,
            string outerMarginsDirection = null,
            bool newPageAfterChart       = false)
        {
            var pdfTableModel = new PdfTableModel()
            {
                NewPageAfterTable     = newPageAfterChart,
                OuterMargins          = outerMargins,
                OuterMarginsDirection = outerMarginsDirection,
                InnerMargins          = innerMargins,
                InnerMarginsDirection = innerMarginsDirection
            };

            var cell = chartBuilder.BuildTableCell();

            cell.TextAlign = textAlign;

            pdfTableModel.Body = new List <List <PdfReportCellModel> >
            {
                new List <PdfReportCellModel>
                {
                    cell
                }
            };

            if (report.Tables == null)
            {
                report.Tables = new List <PdfTableModel>();
            }

            report.Tables.Add(pdfTableModel);

            return(this);
        }