How to have two reports on the same page with iReport

ireportjasper-reports

I want to do a print with two tables on the same page. It's for a cart : there the list of products (title, price…) and the list of payements (with blue card, with money, and so on).

I've try with subreports, but it's seem that's a subreport is for each line of a main report.

I think I need two details bands on my report, but there is only one…

So how to do that ?

Thanks for your help.

Best Answer

If you want to add another detail band, right click on the first detail band Detail 1 and select Add Another Detail Band.

It sounds like you want a report consisting of two repeating lines: the first line will show the product details while the line beneath it will show the payment details for that product. Seems to me that all that information, for both lines, will be coming from your data source. You might try putting all that information in one detail band, but expand the band so that you can put a line of variables for the product details above the variables for the payment method. To change the size of any of the bands in iReport just hover the mouse over the blue dividing lines until the mouse becomes a vertical line with two arrows, then click and drag.

What I'm thinking may work is something like this in the detail band:

<product title> <product price> <product description> <product quantity> <payment type> <payment amount> <payment date>

Each of those fields would be connected to a variable from your data source. That would be one detail band which would repeat for each product and its associated payment type.

Related Topic