Master-Detail with Designer and Entity Datasource

4 posts, 0 answers
  1. Jack
    Jack avatar
    6 posts
    Member since:
    Jan 2017

    Posted 27 Feb 2017 Link to this post

    I have successfully created reports with additional Table items (i.e. in the report footer) that share the same main report datasource, and avoid having it re-execute.  This works well.

    However I now have a different scenario.  We use just Designer for building reports, and entity datasources which are all calls to SQL Server stored procedures.

    I have a Master datasource, call it M, which is the main report datasource.  The detail section has a few fields from M, plus a small Table.  I use a Table as you recommend that as more efficient than a subreport.  I have a second datasource for details fetched for all master rows call it D.  The Table is assigned to D, and I can get a filter condition on the table by referring to a Key field in M.  This all actually displays properly, each Table displays the proper 2 or 3 rows filtered out of the entire D result set.

    However, the datasource D is being re-executed for every master Detail section being displayed.  I somewhat expected that, but still is very bad.

    Also just as a bonus, I have one additional table in the report Footer and refers to the same datasource D and summarizes that data, and of course it causes the datasource D to execute yet one more time.

    I have read many articles here but I have not seen a master-detail example using entity data source, and just Report Designer, and avoiding the multiple re-executions of the D datasource.  I have done a similar layout in SSRS and the detail datasource is executed only once then shared, but I can not find the equivalent implementation using your Report Designer.  Thanks.

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 Feb 2017 Link to this post

    Hi Jack,

    Reports can be processed and rendered once the whole data is available. To save from round-trips to the data source, you can use the data-binding approaches from How to Databind to Collection Properties and Use DataObject as a datasource for nested data items (Table, List, Crosstab, Graph),
    These data-binding approaches use data from the already retrieved objects.

    The attached video can be previewed in IE browser. They illustrate the above suggestions. To use an external DLL with data in the Standalone Report Designer, you need to extend the designer - Extending Report Designer (tutorials are linked at the bottom of the article).


    I hope this helps.

    Regards,
    Stef
    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. Jack
    Jack avatar
    6 posts
    Member since:
    Jan 2017

    Posted 27 Feb 2017 Link to this post

    Thank you for the prompt response.  However, it does not quite fit our needs.

    The first article uses C# code and custom objects.  The second article shows how to link a table to the Same datasource as the rest of the Detail section.  The first video is using Visual Studio and object data sources, the second video is using Visual Studio and custom data objects created in code.

    Our environment as mentioned above is (1) we are using Report Designer and (2) the Detail data is coming from a second datasource, not by sharing the main report datasource.

    Thus,

    A)  we need something efficient (there can be 1,000 or more rows in the main datasource, several times that in the Detail datasource) that does not re-execute the Detail 'D' datasource for every row in the M datasource, and again in the extra table in the report footer.

    B)  is constructed with Report Designer and entity datasources (from stored procedures) as the reporting team members are not dot Net programming gurus.

    I have read several hundred forum posts and documentation web pages, I have not found anything addressing this particular environment.  Thank you.

     

  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 02 Mar 2017 Link to this post

    Hello Jack,

    The idea is that each data item executes its data-retrieval method on its own, even if it pools the same data as other item.
    Thus the solution is to have a business object that expose as properties (custom objects, collections of object, simple types). This business object can be bound to the report's DataSource via data source component like ObjectDataSource/EntityDataSource component. Nested data items can be bound to data provided by the properties of the main data object via expressions (bindings).

    Regards,
    Stef
    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