Title: Datasource in subreports

Hi,

I have to create a master/child report where the datasource is a JRDataSource.
How do I pass the "details" to the child report. How do I make use of the dataSourceExpression ?

For example, consider the following:

Cust=c1
Location=tempe

Cust=c2
Location=jersey

In the main report, I want to group by location and in the subreport show details of all orders where location=tempe.. Something like

Location       
        Tempe
                OrderId=1, ProductId=2, Qty=3
                OrderId=2, ProductId=2,Qty=3

        Jersey
                OrderId=3,ProductId=4,Qty=5

The datasource for the main report is a List of maps having name/value pairs. How do I invoke the subreport and pass data to the subreport where location=tempe in the first case

And location=jersey in the second, but without using sql in the subreport, only via JRDataSource.

Any help will be appreciated

Thank You

Reply via email to