开发者

How to have two reports on the same page with iReport?

开发者 https://www.devze.com 2023-02-07 12:33 出处:网络
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 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.


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.


If your data sets are independent, you could try using two sub reports; one for your products and one for your payments. Your main report doesn't have to have a dataset. Change the "When No Data" option in your main report to "All Sections, No Detail" and include your sub reports in any band other than the detail section.


I needed something similar. On the same page to have two identical prints. This helped me: Detail 1 and select Add Another Detail Band. to create another one detail. Than i copied the same layout from Detail1 to Detail2. It is not so much elegant solution, but it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消