Completed
Last Updated: 10 Oct 2015 18:07 by balazs
balazs
Created on: 28 Apr 2015 10:32
Type: Feature Request
1
Make subreport's data-source settable (bindable) from the main report
F.e Jasper's SubReports have a property called DataSource. The sub-reporst uses this dataSOurce for rendering it content. The DataSource is always set on the Main report. Everything via designer, no need for coding.
3 comments
balazs
Posted on: 10 Oct 2015 18:07
User.Address
User.PostalAddress
User.Wife.Address
User.Wife.PostalAddress

I do wan't to have 1 sub-report (single, reusable) which is then applied in the main report to display 4 addresses.

The way I would use is to put 4 sub-reports on the main report, bind each of them to the data source part (to the concrete addresses, one-by-one).

The solution I got simply does not fulfills the needs what a reporting solution should have. And even not seeing this as priority feedback, cannot understand how this solution could be marked as completed.
balazs
Posted on: 10 Oct 2015 17:59
Sorry, but what you present as solution it's only a TECHNICAL FAULT! It can be done such way, but really nobody should use such a situation in a real working environment...

"Thus when added in a SubReport item, the report will get its data from the DataObject of the SubReport item. Using the Parent key word you can go up the hierarchy of elements and get the whole report data e.g. =ReportItem.Parent.Parent.Parent.DataObject for a sub report placed in a Detail section of report without groupings."

PROS:
The sub-report should not know anything about the entire report (the main datasource)
The sub-report must not be knowing at which level it is

CONS:
0
ADMIN
Peter
Posted on: 07 Oct 2015 11:02
Hi,

Your scenario is feasible with the use of Bindings. For more information see:

http://www.telerik.com/forums/how-to-bind-the-datasource-of-a-subreport-in-the-designer