Report calling code multiple times

2 posts, 0 answers
  1. Tobania
    Tobania avatar
    160 posts
    Member since:
    Apr 2010

    Posted 10 Jan 2013 Link to this post


    I have a report with a table and a chart for each column in this table. All these objects use the same Objectdatasource set from the designer. The problem is that the code behind this datasource is called once foreach object. In my case this is 5 times. 

    The data returned is always the same so why is the code called once for each object that uses this datasource ?

    How can i solve this problem?

    if have added a screenshot of the report

    Thanks in advance
    Sodi We
  2. Peter
    Peter avatar
    1631 posts

    Posted 11 Jan 2013 Link to this post

    Hello Sodi We,

    The data source components are declarative and they only specify how to obtain the data for the data item. They don't store or cache the data. Thus they are invoked once for every data item that is referencing the data source components. Additionally have in mind that the datasource parameters support expressions that can be report item contextual. In this line of thoughts if your data member execution is time and resource expensive our suggestion is implement in your DAL a data source caching mechanism.

    All the best,
    the Telerik team

    HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Back to Top