using japser-reports for printing a contract

Hello,

I am trying to use jasper-report for printing a contract. It might not be an ideal solution for that, but I like the possibilities to save the result to different formats like PDF, MS-Word and so on.

This is the way, I currently desinged the report: I have a Title-page with the definition of both partners and then, for each page of the contract, I have an own Detail-Band. I use for the pages only parameters which are handed over to the report via a hashmap in the fillreport call. Everything works fine so far (beside the fact, that the pagebreaks are somehow "hardcoded" via the change from one detail-band to another...) (If you can suggest a better solution, I would be happy to hear...)

My current challenge is, on the page before the last page, I would like to print some special-agreements. The number of the special-agreements are variable and so I would like to have them printed continiously on the pages until they end... Therefore I instantiated a JRMapCollectionDataSource and another detail-band with the fields. (But now, the contract is completly printed for each special-agreement.

What would be  a good solution to design this? Should I design a subreport for the special-agreements? (And excuse that question, how do I have to fill the subreport with the data? - I haven't used subreports before...)

Thanks in advance, would be nice if you could help me.

Susi.

susanne_j's picture
Joined: Aug 19 2013 - 8:38am
Last seen: 1 year 10 months ago

2 Answers:

Hi Susi,

I see two possibilities to solve:

1) attach the datasource to a list element and place the list element into the last detail band

2) pass the datasource to a subreport and print the special-agreements there

Cheers, Thomas

http://www.ThomasZimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 5 days 19 hours ago

Hello Thomas,

many thanks for your answer!

I got through the challenge via using a subreport. Works great :-)

Thanks again.

Susi.

susanne_j's picture
Joined: Aug 19 2013 - 8:38am
Last seen: 1 year 10 months ago
Feedback