Generating PDFs
Similar to the "Print Labels" button, the <PrintReport
button will load the available reports for the current type
.
The proposed API is described in grin-global-server#261 (closed) and implemented in grin-global/grin-global-server!347:
- Extend
CRUDController
with GET /report/list to get the list of report templates stored in the file repository for this entity. The method returnsList<RepositoryFile>
.- Extend
CRUDController
with POST /report/generate/{reportTemplate} that receives the name of the Jasper report (in file repository) and a set of entityLong id
s from the client. The service will load the list of entities (in a read-only transaction) and return the PDF generated by Jasper for the provided entities.
The <PrintReport
will load the available reports, allow the user to select the report in a Dialog and will open the resulting PDF (in a new tab?)
Support is available for generating a PDF for multiple (selected) items.