Regenerating Report Output

To export a report in a different format after its first execution, or to export a specific page, use the POST method of the report service. For example, it is possible to download the report one page at a time by repeatedly sending the appropriate POST and GET requests.

Method

URL

POST

http://<host>:<port>/jasperserver[-pro]/rest/report/<UUID>?<arguments> (see example below)

Argument

Type/Value

Description

RUN_OUTPUT_<br />FORMAT?

OutputType

The format of the report output. Possible values: PDF, HTML, XLS, RTF, CSV, XML, JRPRINT. The Default is PDF.

IMAGES_<br />URI?

String

The uri prefix used for images when exporting in HTML. The default is images.

PAGE?

Integer > 0

An integer value used to export a specific page.

Return Value on Success

Typical Return Values on Failure

200 OK – The new details of the report. The old files produces are discarded and replaced with new ones.

404 Not Found – When the specified UUID is not found in the user’s session.

For example, the following request exports page 10 of the PDF report:

POST http://host/rest/report/d7bf6c9-9077-41f7-a2d4-8682e74b637e?PAGE=10&RUN_...

You then need to take the file name from the return value and create a GET request for it.

Version: 
Feedback
randomness