przemyslaw.pytlak Posted December 4, 2015 Share Posted December 4, 2015 Hi, I have a question,I would like to generate report with Data Source added as a JSON file in POST request and I'm little confused.1) I see in JasperStudio that I can choose JSON File Adapter via URL, but as I understand I will have to create sth like web service / server where I will have to collect json files and my data source will GET the JSON every time I will run report2) I see in documentation that I can call report asynchronously and add json content but as I understand that is just some kind of "request definition"So my question is:Is it possible to send easy JSON to jasperserver as a part of post request and receive for example PDF file from jasper. Probably I'll have to create special application for example website where I will have to create form with button and post javascript function which will create request but I'm not sure how the report will know that in my post is my dataSource - needed to fill the reportany help where to find the answer?eidt: or maybe I have to keep json file in some server, then run report as I wrote above and there is no other option. Link to comment Share on other sites More sharing options...
hozawa Posted December 6, 2015 Share Posted December 6, 2015 You just have to create a simple servlet. If you POST, just use getReader() to get the body. You'll need to use JasperReports Java library to create a report (you won't need REST API). This should only require few lines of codes to do. 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