Senthil Muthiah
Senthil Muthiah

Reputation: 97

How to print report more than once with difference invoice numbers

Using iReport 4.5.0, I have designed the report to print invoice by giving the invoice no as parameter. The report contains Title, Page header, Detail (items in the bill), Summary, etc.

Every thing working fine. Now the client asking to print more than one invoice i.e from the list they will select more than one invoice and they want to print all?

Any idea? Do I need to change the entire report into detail section or any other idea

Upvotes: 0

Views: 306

Answers (1)

Israel Lopez
Israel Lopez

Reputation: 1145

You can do a few things.

You can keep the report as an individual report, and execute each report with a list of Invoice Numbers. You will need to handle this in your application.

 where invoice.num = $P{invoicenum}

OR

Modify the report to be a batch report that takes in a list of Invoice Numbers. To provide a list your application will need to generate a SQL appropriate list of invoice numbers/IDs what have you.

 where invoice.num in ($P!{invoicenums})

OR

Create a Batch Report that uses your Invoice report as a subreport, run a SQL query based on your criteria in the Batch Report, and use the Invoice Report as a detail band that gets passed Invoice Numbers.

Upvotes: 1

Related Questions