Hi critical problem that i am facing is,
I am creating multiple chart objects at runtime as per the no of data tables calculated at run time.
and i am assigning the source(data table) also at run time.
while at the time of report genaration,every chart object that are created at run time are all get rendered to pdf format by
for (int i = 0; i < ChartProp.dsChartSrc.Tables.Count; i++)
{
UltraChart ultraChart1 = arrayCharts[i];
ultraChart1 .Data.DataSource = ChartProp.dsChartSrc.Tables[i];
ISectionPage _sectChartPage = _sectFirst.AddPage();
Graphics g1 = _sectChartPage.AddCanvas(120, 60).CreateGraphics();
ultraChart1.RenderPdfFriendlyGraphics(g1, 325, 240);
}
All number of charts are rendered to each of the section pages with no data source bound.(ie) chart with No DataSource bound.
I need a quick solution for this problem. Any immediate solution!!! !!!! !!!!!
Try calling ultraChart1.Data.DataBind() after assigning the datasource. The chart needs to create its child elements before it can be exported to pdf, which should be triggered by calling DataBind() or SaveTo()