eugene s Posted February 20, 2016 Share Posted February 20, 2016 Hello! I want to create a service that produces pdf from csv files. The service must have a csv and template as input and pdf as output. To do that I wanted to use Jasper Server REST API. I decided to try it manually for the beginning and was quite disappointed that there was no ability to use csv as datasource. The only workaround was found here: http://community.jaspersoft.com/questions/802580/how-create-excel-data-source-jasperreports-servers`. But creation report this way looks like a mess. Changing extension of the source csv file to xml, creation additional data provider with hardcoded link to the source file and editing template to set hardcoded link to the data provider. All of this doesn't look like proper way to generate a report from csv. Does anybody know some easier way? Maybe commercial version of the server has some useful features? The best solution I'd like to have is passing a bundle of csv source file and appropriate template to the server through REST API and get generated pdf. Is there something like this? Thanks Link to comment Share on other sites More sharing options...
hozawa Posted February 21, 2016 Share Posted February 21, 2016 JasperReports Server doesn't have a feature to directly use csv file as a datasource.It's not very difficult to create a simple servlet to use csv as a datasource and output pdf. Link to comment Share on other sites More sharing options...
honeybakliwal Posted February 23, 2016 Share Posted February 23, 2016 First to let you know that JasperReports Server have a direct connection with csv so using that datasource you can establish the connection. Check version 6.0.1 Than just write a servlet to fetch the data from csv and set its export to pdf ThanksHoney Link to comment Share on other sites More sharing options...
eugene s Posted February 23, 2016 Author Share Posted February 23, 2016 JasperReports Server have a direct connection with csv so using that datasource you can establish the connection honeybakliwal, could you please give an example? I'm not sure I understand what is a direct connection with csv. 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