ignorePagination Option Broken on Exports in 5.6.1


I want to generate a report through the REST api that is not paginated for the html output and then paginated for pdf. If I run an asynchronous report and send through the relevant parameters (including ignorePagination : true) then I can generate the non paginated html version. But if I then go and request an exported pdf version with no pagination then it ignores the ignorePagination : false option and just returns one gigantic page for a pdf.

This is what I send through the api. If I have ignorePagination : true in the original request object then it returns a non-paginated pdf.

POST http://<host>:<port>/jasperserver[-pro]/rest_v2/reportExecutions/myRequestID/exports/
    "outputFormat": "pdf",
    "ignorePagination" : false

Similarly, if I have ignorePagination : false in the original request and ignorePagination : true in the export request I then get back a paginated pdf.

Is this a bug with 5.6.1 or am I doing something wrong? If it is a bug then is it fixed in 6? I don't think I am doing anything wrong as I can request say Pages 8 and 9 of a report in the pdf only using the "pages" property but ignorePagination just doesn't seem to work at all.


jasperUser12's picture
Joined: May 23 2014 - 4:52pm
Last seen: 7 years 5 months ago

1 Answer:

I will have to read the documentation again.. but I think that is the intended functionality. When you use reportExecutions method of the API that executes and fills the report once (creating the jasperprint object) and then re-uses that to give you all the exports you want. Since ignorePagination has to be sent before the fill process once the jasperPrint object is generated with ignorePagination all the exports will be like that.

What you can do is when you need to call the PDF (that should be paginated) instead of reusing the requestID you already had use the /reports method of the API to get that pdf, something like: http://<host>:<port>/jasperserver-pro/rest_v2/reports/reports/samples/AllAccounts.pdf?<attributes> that will do the report you want.


marianol's picture
Joined: Sep 13 2011 - 8:04am
Last seen: 4 years 12 months ago