How to merge two jrxml jasper reports into a one single pdf output file ?

0

I have to prepare reports using five different sql queries. Each query will give out one report table.

So I wrote 5 jrxml files each corresponding to one of the above query with their own headings, title settings, footers, pagenumbers, etc.

Now, I am able to compile, print and export each of the above jrxmls into 5 different pdfs.

However, client wants all the reports collated into one single pdf. That is in the final pdf, first four pages will be say report one, next five pages report two, then report three and so on and so forth.

1) How to achieve this ?

2) Each report has page number as 1/4, 2/4, 3/4 etc. Where the second part i.e. the complete page number is evaluated with evaluation time as report. So when I will collate all reports in single pdf (if possible), will it also be possible to re-number the pages in justification to final pdf ?

jani99harsh's picture
Joined: Mar 3 2017 - 1:12am
Last seen: 2 years 1 month ago

One option is to use your created reports as subreports in a main one. 

Another option is to use Jasper Books.

You will have to take care of pagination by yourself if you want something special besides the default 

Alex42 - 2 years 3 months ago

2 Answers:

1

One option is to use your created reports as subreports in a main one. 

Another option is to use Jasper Books.

You will have to take care of pagination by yourself if you want something special besides the default 

Alex42's picture
122
Joined: Dec 7 2016 - 4:24am
Last seen: 19 hours 42 min ago
1

If you are programming, you can just concatenate your jasper objects. I think there was a method to get the page number. Just pass the page number as a parameter. I've done this several times before so know that this works.

hozawa's picture
45149
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 1 week ago
Feedback