Hi,
I have a report with multiple charts but only one sql datasource and uses filtering of the results for each chart.
The sql datasource calls a stored procedure with parameters and returns the results for all charts.
I noticed a performance issue on the report with large datasets and found out that even though I have one datasource the stored procedure is executed on the database for each chart with exactly the same parameters (in the designer and in the silverlight report viewer).
I have tried to use the needdatasource event of the charts and execute the sql there for the first chart and use the same dataset in the others but that does not seem to work either.
I have placed the code below.
If a stored procedure is used and the parameters of the stored procedure is not changed it would make sense to only execute it once right?
Thanks for the Help,
Kobus
I have a report with multiple charts but only one sql datasource and uses filtering of the results for each chart.
The sql datasource calls a stored procedure with parameters and returns the results for all charts.
I noticed a performance issue on the report with large datasets and found out that even though I have one datasource the stored procedure is executed on the database for each chart with exactly the same parameters (in the designer and in the silverlight report viewer).
I have tried to use the needdatasource event of the charts and execute the sql there for the first chart and use the same dataset in the others but that does not seem to work either.
I have placed the code below.
If a stored procedure is used and the parameters of the stored procedure is not changed it would make sense to only execute it once right?
Thanks for the Help,
Kobus
public
partial class Report1 : Telerik.Reporting.Report
{
DataSet dataSetChart = null;
public SummaryDashboardReport()
{
InitializeComponent();
}
private void char1_NeedDataSource(object sender, EventArgs e)
{
dataSetChart = FillChartDataSet();
(sender
as Telerik.Reporting.Processing.Chart).DataSource = dataSetChart;
}
private void chart2_NeedDataSource(object sender, EventArgs e)
{
(sender
as Telerik.Reporting.Processing.Chart).DataSource = dataSetChart;
}
}