Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
chart is not rendered in report without being displayed before
posted

Hey there, i want to include a chart in my report. Therefore i created a UserControl containing all layout stuff i want to have in my xps/print. It is just a simple line-chart and in the constructor i bind to sample data. If i display this control in a "real" window

<infragisticsChart:UserControl1 x:Name="MyTestInstance"/>

and then print it

var reportObj = new Report();
reportObj.Sections.Add(new EmbeddedVisualReportSection(MyTestInstance));
reportObj.Export(OutputFormat.XPS, "c:\\temp\\test.xps");

everything is fine. However, if i want to render the xps without having it in a real wpf window / page, the chart is not rendering anything. If i do

var reportObj = new Report();
reportObj.Sections.Add(new EmbeddedVisualReportSection(new UserControl1()));
reportObj.Export(OutputFormat.XPS, "c:\\temp\\test.xps");

I tried setting the size, InvalidateMeasure, InvalidateVisual and other things on the control, but it is just not rendering the chart.

The question is: How can i create a report with a chart on a console app / server / service? How do i tell / force a Chart to do its calculations and actually generate the view?

Thanks

Parents Reply Children