This is a migrated thread and some comments may be shown as answers.

how to pass object parrameter to subreport?

1 Answer 623 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
qwe
Top achievements
Rank 1
qwe asked on 14 Mar 2019, 05:00 PM

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

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 19 Mar 2019, 09:53 AM
Hello,

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,
Silviya
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
Tags
Report Designer (standalone)
Asked by
qwe
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or