rxe12953 Posted September 20, 2019 Share Posted September 20, 2019 hello everyone I'm supposed to answer some basic questions regarding Jasper for my company. And would be grateful if someone could help me :) . I am quite new in project management and am a bit overwhelmed with this task. (i am extremely grateful for any help i receive!)1.) How can I create reports in JasperReports? (very likely similar to Activity Reports?) 2.) How can the data be transferred to JasperReports? (e.g. connection of external systems, file base etc.). The data must be transferred from other programs (Excel, Lobster, csv, txt) to Jasper, so that the created templates can be used. 3.) How can the reports be printed and transferred as a file? many thanks in advance :D Link to comment Share on other sites More sharing options...
C-Box Posted September 23, 2019 Share Posted September 23, 2019 Well the report designs (jrxmls) are written within a Designer like JasperSoft Studio or the older version iReport (but there just the old versions of JaspertReports < 6.x are supported - so take the Studio for the latest JasperReports release).You will have to load that design in your java app (I assume you have one or you want to create an app) by Jasper API e.g. from FileSystem by JRLoader and will get a JasperReport-Object. (compile the .jrxml by the JRCompileManager or just load the generated .jasper files generates by the designer as well)The data for that JasperReport-Object are passed in different ways depending of your architecture.... so if you have just a simple CSV file you could create JRCSVDataSource and load the records for passing them to the JRFillManager that transforms the data to the wanted report result. (normally the data are stored within a database and you will fetch them by sql query - but therefore JasperReports is very flexible and you can use simple files like csv/xml/json/xls/... also as "datasource")After you have called the filling process you will get an JRPrint-Object that could be send to a printer by using the JRPrintServiceExporter or you could export it to a PDF File with the JRPDFExporter.If you start from a green field - as it sounds - I would advice loading the FULL JASPERREPORTS Project from Sourceforge and take a look into the samples. There you can learn a lot of your requirements (loading data from file, transform it to a report and export/print it).The alternative to the Jasper API would be to install the JasperReport-Server that is a kind of ReportServer, where you can manage all that stuff for loading designs and filling them with different datasources (so normally by sql-connection or also by xml/csv/excel files) and save the output as pdf or just view it in brower or send it to a printer. So it depends on your architecture/infrastructure/needs?!?! :-)hth + regardsC-Box 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