Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to separate table and chart on report
    text
    copied!<p>Using Reporting 2008, I have defined a chart based on a tablix and would like to export this to pdf. I'm generating the rdlc dynamically, since datasource and other settings is expected to change. Both tablix and chart are indeed generated, however the tablix is placed right on top of the chart, rather than after it? How do I separate them other than doing a pagebreak?</p> <p>BodyType only consist of these attributes</p> <pre><code> [System.Xml.Serialization.XmlElementAttribute("Height", typeof(string), DataType="normalizedString")] [System.Xml.Serialization.XmlElementAttribute("ReportItems", typeof(ReportItemsType))] [System.Xml.Serialization.XmlElementAttribute("Style", typeof(StyleType))] </code></pre> <p>and ReportItemsType of these, I don't see anything obvious options for separating them.</p> <pre><code> [System.Xml.Serialization.XmlAnyElementAttribute()] [System.Xml.Serialization.XmlElementAttribute("Chart", typeof(ChartType))] [System.Xml.Serialization.XmlElementAttribute("CustomReportItem", typeof(CustomReportItemType))] [System.Xml.Serialization.XmlElementAttribute("GaugePanel", typeof(GaugePanelType))] [System.Xml.Serialization.XmlElementAttribute("Image", typeof(ImageType))] [System.Xml.Serialization.XmlElementAttribute("Line", typeof(LineType))] [System.Xml.Serialization.XmlElementAttribute("Rectangle", typeof(RectangleType))] [System.Xml.Serialization.XmlElementAttribute("Subreport", typeof(SubreportType))] [System.Xml.Serialization.XmlElementAttribute("Tablix", typeof(TablixType))] [System.Xml.Serialization.XmlElementAttribute("Textbox", typeof(TextboxType))] </code></pre> <p>I have something like this (abbreviating), I can sort of control the location by specifying Left and Top parameters, however what if the size of the chart was dynamic. What I am looking for is something that automatically places the table right after the chart, regardless of the size of the chart.</p> <pre><code> private Report CreateReport() { Report report = new Report(); report.Items = new object[] { CreateDataSources(), CreateBody(), "6.0in", CreatePage(), CreateDataSets(), }; report.ItemsElementName = new ItemsChoiceType80[] { ItemsChoiceType80.DataSources, ItemsChoiceType80.Body, ItemsChoiceType80.Width, ItemsChoiceType80.Page, ItemsChoiceType80.DataSets, }; return report; } private BodyType CreateBody() { BodyType body = new BodyType(); body.Items = new object[] { CreateReportItems(), "10in", CreateBodyStyle(), }; return body; } public StyleType CreateBodyStyle() { StyleType style = new StyleType(); return style; } private ReportItemsType CreateReportItems() { ReportItemsType reportItems = new ReportItemsType(); TableRdlGenerator tableGen = new TableRdlGenerator(o_View); ChartRdlGenerator chartGen = new ChartRdlGenerator(o_View); tableGen.Fields = m_selectedFields; reportItems.Items = new object[] { chartGen.CreateChart(), tableGen.CreateTablix() return reportItems; } public TablixType CreateTablix() { TablixType table = new TablixType(); table.Name = "Tablix1"; table.Items = new object[] { CreateTablixBodyType(), CreateTablixColumnHierarchy(), CreateTablixRowHierarchy(), "MyData", "3.5in", "0.125in", "0.5in", "6.5in", CreateTablixStyle(), }; table.ItemsElementName = new ItemsChoiceType73[] { ItemsChoiceType73.TablixBody, ItemsChoiceType73.TablixColumnHierarchy, ItemsChoiceType73.TablixRowHierarchy, ItemsChoiceType73.DataSetName, ItemsChoiceType73.Top, ItemsChoiceType73.Left, ItemsChoiceType73.Height, ItemsChoiceType73.Width, ItemsChoiceType73.Style, }; return table; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload