how to pass object parrameter to subreport?

2 posts, 0 answers
  1. qwe
    qwe avatar
    1 posts
    Member since:
    Feb 2019

    Posted 14 Mar 2019 Link to this post

    Hi all,

    Is it possible to pass object with set of fields to sub report. I was going to load all data in main report and pass some parts to subreport but there are only simple types for parameters and no object type. is it possible via report designer or I have to convert to visual studio? report is quite complex


    thanks in advance

  2. Silviya
    Silviya avatar
    417 posts

    Posted 19 Mar 2019 Link to this post


    Report parameters are of simple types like String, Integer, Float, DateTime, Boolean allowing you to submit keys and other information helping you get data. An available approach is passing a JSON encoded object via report parameter as a string value. Please refer to this answer from our community member that describes how to do this: How to pass object as report parameter.

    As in your case, the data needed for your subreport data item will already be present in the parent's data source e.g., the report's data source. In such cases, you can improve the report performance by reusing the data from the parent, instead of creating and configuring a new data source component to retrieve the data anew. You can reuse the data by adding a Binding to the subreport data item's DataSource property, which sets the following expression:

    = ReportItem.DataObject

    This approach is also described in this help article section.

    Best Regards,
    Progress Telerik
    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