Problem with Latest 9.2.15.1126 ReportViewer's Custom Report Resolver

4 posts, 0 answers
  1. Stuart
    Stuart avatar
    5 posts
    Member since:
    Dec 2011

    Posted 26 Jul Link to this post

    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?

  2. Katia
    Admin
    Katia avatar
    306 posts

    Posted 27 Jul Link to this post

    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
  3. DevCraft banner
  4. Stuart
    Stuart avatar
    5 posts
    Member since:
    Dec 2011

    Posted 27 Jul in reply to Katia Link to this post

    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!

  5. Katia
    Admin
    Katia avatar
    306 posts

    Posted 29 Jul Link to this post

    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
Back to Top