Datasource Explorer gets messy

10 posts, 0 answers
  1. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 06 Oct Link to this post

    Hello,

    When maintaining reports with extensive use of Object data source objects, it is difficult to navigate in the Datasouce explorer pane. The listing seems to have no sensible sorting order, or ways of re-ordering or grouping the objects. Using sub reports is not an option for me, as it will be very difficult to keep the Excel exportable format when parts of the layout is locked inside an individual component. 

    Any thought on how this can be improved?

     

    Best regards,

    Magnus

  2. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 07 Oct Link to this post

    Hi Magnus,

    Data source components provide declarative manner for specifying a data object. the ObjectDataSource uses System.Reflection to create an instance of the specified class and to execute the method specified through the ObjectDataSource.DataMemeber property.

    About the pane listing the added data source components, it will display them in order of appearance (being added) to the report - check the InitializeComponent method and the order of appearance of data source components.

    Please feel free to log a feature request for having improvements in the report designer's UI with details about the case and what management of data source components will be helpful in your case.


    To avoid keeping that many data source components, we can suggest you to use a data model exposing relations between objects. Then you can bind nested data items (Table, Graph, Map, sub reports) to the collection properties of the main business object - see How to Databind to Collection Properties and Use DataObject as a datasource for nested data items (Table, List, Crosstab, Graph).


    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. DevCraft banner
  4. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 08 Oct in reply to Stef Link to this post

    Hello Stef,

    Thank you for the informative reply. I have logged a feature request here: https://feedback.telerik.com/Project/162/Feedback/Details/203030-improved-listing-of-data-source-components-added-to-the-report

    In my report, the data source components are not consistently listed in the in the order of appearance. Most of them maybe, but there are several exceptions and I do not see any pattern of when exceptions occur. 

    All my data source components take several parameters, which are individual to each object. It is a key point that it is possible to maintain these parameters within the Report Designer, not having to do custom programming on the back end API (exposing Business Objects)

  5. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 11 Oct Link to this post

    Hello Magnus,

    Please check if the order of data source components changes when you reconfigure any of them - check the content of the InitializeComponent as well, which may be the reason to have them reordered. In our tests components remain in order they are added.


    About parameters, please elaborate how data source components are configured and how values are submitted to the data-retrieval methods.

    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
  6. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 13 Oct in reply to Stef Link to this post

    Hello Stef, 

    The order does not change when I reconfigure them, and I also tried to manually change the order of appearance in InitializeComponent() as well as restarting Visual Studio without effect. Could there be some kind of file-based caching in the designer that has cause the ordering to "freeze"?

    In the report I am currently working with, I am fetching results from a time series database into a large table. I have an individual object data source for each cell, as my API require several parameters for each call - like fetch type and ID of the involved time series.

    The challenge with fetching data for multiple cells in one data source is that it would be difficult to handle all the required parameters. Hard coding tailored Business objects is currently not an option. One reason for this is that there will be customization of the report for different clients that would require adding or removing some of the cells, as well as the ID for the time series are likely different in different environments where the report will be destroyed. 

    So back to the starting point, I think improved listing of data source components would be the best solution for me. Or alternatively a way to assemble multiple API calls into one data source - something similar to linking entities into one query. But I guess this would be far more complex to implement, unless it is something already being worked on.

     

  7. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 17 Oct Link to this post

    Hi Magnus,

    Please post the code-behind of the report and let us know how you change it to affect the order of data source components. The attached video illustrates our test - it is a SWF file that can be previewed in IE browser.

    About getting data in the report, if you can combine the retrieved records in a DataSet or other custom data objects, you can use a single DataSource component. The data retrieval method will execute all requests and will return the final DataSet.
    You may find interesting How to: Use ObjectDataSource with ExpandoObject.

    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
  8. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 18 Oct in reply to Stef Link to this post

    Hello Stef,

    Thanks for your reply.

    The ExpandoObject example involves coding which is what I want to avoid.

     

    Best regards,

    Magnus

  9. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 18 Oct Link to this post

    By the way, drag-drop enabled re-ordering of the data souces in the data sources pane could also be a solution. 
  10. Katia
    Admin
    Katia avatar
    309 posts

    Posted 20 Oct Link to this post

    Hello Magnus,

    Feel free to add a comment to the feature request you logged. Any ideas and thoughts what would be the best approach for organizing the data sources are welcomed.


    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
  11. Magnus
    Magnus avatar
    10 posts
    Member since:
    Nov 2015

    Posted 21 Oct in reply to Katia Link to this post

    Hello,

    Just want to share with you that I managed to significantly reduce the number of data source in my report by exposing parts of my reporting backend API as User Functions in the Report Designer. I could do this for the functions that returns a single value. These were the kind of API-calls that previously was triggered by a large number of individual data sources. 

    Thank you for your answers, stef and Katia.

     

    Best regards, 

    Magnus

     

Back to Top
DevCraft banner