1
votes

I have a report and a subreport.

How can I pass to my subreport an information of the current element being "iterated" in my master report so that it will populate the query of my subreport?

Example:

I have in my problem an Auction. An auction has a set of Product. These products will populate the master report. But a Product has another information that I want, which is Company (the company who bought it).

So what I want to do is:

My master report will have a query selecting the Products from a given Auction. The report must have a subreport that contains other information about each product. How can I give the ID of the current product to the subreport so that it can be populated?

-> Master report: selects Products from the Auction. (is working fine ^^)

-> Subreport : for a given Product (passed by the master report), create a report.

Thanks in advance =D

1

1 Answers

4
votes

I found out a way of doing this (pretty logic)..

Just pass to the subreport the field of the datasource being used. Thus, When it iterates in the Detail field, it will get the values of each element in your query.