Hello,
on my report i have a simple chart1. This chart1 has a datagroupcolumn and uses the NeedDataSource event. The chart is shown perfectly in the report.
However when exporting to PDF/TIFF/ HTML it shows a different chart!
Simple example:
In the chart1.designer.cs code i add 2 lines:
this.chart1.DataGroupColumn = "Name";
this.chart1.NeedDataSource += new System.EventHandler(this.chart1_NeedDataSource);
In the chart1.cs code i have add the following needdatasource:
private void chart1_NeedDataSource(object sender, System.EventArgs e)
Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
DataTable tbl = new DataTable();
DataColumn col = new DataColumn("Val");
col.DataType = typeof(int);
tbl.Columns.Add(col);
col = new DataColumn("Val2");
col.DataType = typeof(int);
tbl.Columns.Add(col);
col = new DataColumn("Name");
col.DataType = typeof(string);
tbl.Columns.Add(col);
tbl.Rows.Add(new object[] { 11, 3, "a" });
tbl.Rows.Add(new object[] { 11, 4, "a" });
tbl.Rows.Add(new object[] { 11, 5, "b" });
tbl.Rows.Add(new object[] { 11, 6, "b" });
tbl.Rows.Add(new object[] { 11, 7, "c" });
tbl.Rows.Add(new object[] { 11, 8, "c" });
chart.DataSource = tbl;
}
When exporting this to PDF is seems like if the first bar of the datagroup is correct, but the other bars are just copies of this first bar, even though they have different values. There seems something wrong with rendering to PDF when you are using the DataGroupColumn. This seems like a bug.
When i just remove the DataGroupColumn, it obviously shows me a completely different chart, but that one is exported in the right way. We are using Telerik Reporting 2008 Q1. I've read some release notes of future versions but cannot find anything related to this. Any suggestions?
John Neus