private static void AddBody(Report report, Modeling.Report repdef) { var coldefs = new List<Viziblr.Reporting.RDL2005.ColumnDef>(); coldefs.AddRange(repdef.ColumnDefinitions); while (coldefs.Count < repdef.DataTable.Columns.Count) { var coldef = new ColumnDef(); coldef.Width = repdef.DefaultColumnWidth; coldefs.Add(coldef); } var body = new Body(); SetBodyProperties(repdef, body); AddTitle(repdef, body); AddTableDataRegion(coldefs, repdef, body); report.Body = body; }
private static void AddTableDataRegion(List <ColumnDef> coldefs, Modeling.Report repdef, Body body) { var table = new Table(); table.Name = "REPORT_DATAREGION"; table.Top = repdef.DataRegionTop; table.DatasetName = repdef.DatasetName; AddTableHeader(repdef, table, coldefs); AddTableDetailCells(coldefs, repdef, table); AddTableDataColumns(coldefs, repdef, table); AddTableGrouping(repdef, table); body.ReportItems.Add(table); }
private static void SetBodyProperties(Modeling.Report repdef, Body body) { body.Height = repdef.PageLayout.BodyHeight; body.ColumnSpacing = repdef.BodyColumnSpacing; }
private static void AddTableDataRegion(List<ColumnDef> coldefs, Modeling.Report repdef, Body body) { var table = new Table(); table.Name = "REPORT_DATAREGION"; table.Top = repdef.DataRegionTop; table.DatasetName = repdef.DatasetName; AddTableHeader(repdef, table, coldefs); AddTableDetailCells(coldefs, repdef, table); AddTableDataColumns(coldefs, repdef, table); AddTableGrouping(repdef, table); body.ReportItems.Add(table); }
private static void AddTitle(Modeling.Report repdef, Body body) { var tbtitle = new TextBox("REPORT_TITLE", repdef.ReportTitle); tbtitle.CanGrow = true; tbtitle.Height = repdef.TitleHeight; tbtitle.Style.FontFamily = repdef.DefaultFontFamily; tbtitle.Style.FontSize = repdef.DefautlReportTitleFontSize; body.ReportItems.Add(tbtitle); }