jasperUser12 Posted May 20, 2015 Posted May 20, 2015 Hi,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}[/code]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.Thanks!
marianol Posted May 21, 2015 Posted May 21, 2015 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.
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