susanne_j Posted August 19, 2013 Share Posted August 19, 2013 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. Link to comment Share on other sites More sharing options...
Solution Thomas Zimmer Posted August 19, 2013 Solution Share Posted August 19, 2013 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 band2) pass the datasource to a subreport and print the special-agreements thereCheers, Thomashttp://www.ThomasZimmer.net Link to comment Share on other sites More sharing options...
susanne_j Posted August 20, 2013 Author Share Posted August 20, 2013 Hello Thomas,many thanks for your answer!I got through the challenge via using a subreport. Works great :-)Thanks again.Susi. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now