This is a migrated thread and some comments may be shown as answers.

Problem with Latest 9.2.15.1126 ReportViewer's Custom Report Resolver

3 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stuart
Top achievements
Rank 1
Stuart asked on 26 Jul 2016, 12:25 PM

I recently updated the Telerik.ReportViewer control from 9.0.something to 9.2.15.1126.  Since this update I have started noticing that the report-resolver is called multiple times (more than the previous version before) as now our database procedures (that fetch the data for the report) are being hit multiple times - ONLY for the first time a report is run.  Subsequent calls only call the data fetch once as before.

I was already aware that the Resolve method is called multiple times, and to stop it getting the data multiple times, I access the view model and check the ReportObject to ensure it is null before going to get the data - (resetting this to null every time user request to run the report).  So the first line in my resolver is:

If (viewModel.ReportObject == null)

{

  viewModel.ReportObject = FETCHDATA()

}

This would stop the data being fetched multiple times.  However, since updating to the 9.2.15.1126, the resolver seems to be hit twice instantly, the code has not had chance to set the ReportObject before resolver is called again....  What has changed?  And how do I stop this now?  Its putting heavy loads on databases unnecessarily and degrading overall performance of the server.

Could someone shed a light on this situation?

3 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 27 Jul 2016, 01:00 PM
Hello Stuart,

The Resolve() method will be called multiple times by design - REST Service Report Resolver. Thus, it is not recommended to process large data sets inside the Resolve method.

It is recommended to use custom cache for data objects to avoid retrieving them again or/and to filter the data programmatically before it is passed to the report with data source parameters. The data source parameters will be passed to the data retrieval method where you can process the data.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stuart
Top achievements
Rank 1
answered on 27 Jul 2016, 01:11 PM

Hi Katia,

Thanks for response.  Is there a sample that I can look at that does data processing outside of the resolve method?  Ie. a sample that uses a custom cache for data objects.

Much appreciated!

0
Katia
Telerik team
answered on 29 Jul 2016, 01:28 PM
Hi Stuart,

There is no specific approach that we recommend. The general approach is caching the created objects or using a declarative approach to retrieve the data.
For example, you can create a separate data access layer with methods caching the retrieved data. The methods' arguments can be mapped to report parameters - Using Parameters with the ObjectDataSource Component.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Stuart
Top achievements
Rank 1
Answers by
Katia
Telerik team
Stuart
Top achievements
Rank 1
Share this question
or