mchisty Posted January 2, 2023 Share Posted January 2, 2023 Hi,We are using SpringBoot for microservices solution. For reporting solution, we are in the process of migrating to JasperSoft latest version 8.1.x. We have a requirement as follows:Step 1: A SpringBoot class/API (@RestController) should invoke a Jasper report API published in JasperServer by passing a list of DTO objects e.g. as a request body. The report URL may look like this http://localhost:8080/jasperserver/rest_v2/reports/LT/stimulus.pdfStep 2: The expectation is that the PDF report should be generated based on the json data provided in request bodyQuestions: Q1. Can you provide any example using which we can achieve the above?Please note: Most of the examples online are not very useful; they are very basic and they mostly show about placing the .jrxml or .jasper file within the spring boot application. (screenshot attached which is a bad example; very old style approach). And this is not what we are looking for. The jrxml/jasper template should only deployed in the jasper server and we want to produce the report by making a REST API call from Java/Spring and passing json data in request body or JRBeanCollection etc.Q2. Is there any sample where we can test from Postman API by calling a jasper report by passing json input in request body?Your feedback would be appreciable.With Thanks. Link to comment Share on other sites More sharing options...
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