tags: Java
, JasperReports
, J2EE
posted: Friday, April 8th, 2005
The most recent project I have been working on involved creating a large number of reports for the company’s extranet/intranet. In the past, I have usually done reports using some form of JSP and JDBC. But in this case, there is a large number of reports to be developed, and so I was tasked with researching some of the open source solutions for reporting, in hopes we could find a solution that would allow us to get the reports done faster, and be provided to the user with more functionality, and with less custom code.
In the end we compared Crystal reports with JasperReports, and JasperReports was picked. JasperReports is not only free, but also is proven in the Java world, and has a lot of users. It is customizable, since its Java and open source, and has support for using Collections or Lists of Business Objects, such as those populated via Hibernate.
Once JasperReports was chosen, I tested several GUI’s to help build the reports instead of editing them strictly in their native XML. JasperAssistant was found to be the best of all of them, and integrates seamlessly with Eclipse. If you are an Eclipse fan as I am, then you’ll love using JasperAssistant. It even allows you to preview the report against your database right in Eclipse.
Next, I looked into OpenReports. OpenReports is a front end for JasperReports. It was written in WebWork, and provides a lot of functionality that you would have to write yourself to get the reports running on the web. It comes with basic security (users, passwords, and reporting groups). You can assign which users can access which groups, and which reports are in which groups. You can also add parameters, and then assign them to a report. You create the JasperReport in JasperAssistant (or with any other tool, including a text editor if you want to do the XML by hand), and then compile it (which JasperAssistant does for you). Then when you add a new report to OpenReports, you select which JasperReport file to use, select your datasource, assign your parameters and the report is ready to be used on the web.
OpenReports allows the user to export the report as a PDF, HTML, CSV, XLS, or PNG. This is all done for you without any additional work. As for parameters, there is some good functionality built in. When you add a Date parameter to your report, it automatically brings up a calendar for the user to select the date with. Also, you can add a query parameter which runs an sql that you have specified, and populates a drop down select box with the results. Parameters can be marked as required or optional, can be several different data types, and can be told to come in in any order needed. There are other parameter options as well. It also allows the user to schedule a report and have it emailed to a user.
I have made some improvements to OpenReports, including the Collection/List functionality to use Business Objects which JasperReports supports, but OpenReports currently doesn’t. At some point I’ll pass that code on to the original developers.
In the end, with JasperReports and OpenReports, the only thing you have to worry about is creating the SQL to get the data. After that, it takes little work to provide a nice looking report in multiple formats on a web site.
Comments (275)
Leave a Comment
Pages: « 28 … 25 24 23 22 21 [20] 19 18 17 16 15 … 1 » Show All
Hi
Iam using jasperreports in my project.I used jasperViewer to generate the reports.when i save the report as .csv.I don’t want to use JRCsvExporter class to export the report.The alignment is not proper?.Pls help me out
Iam using jasperreports in my project.I used jasperViewer to generate the reports.when i save the report as .csv.The alignment is not proper?.Is there any solution for this?.
It’s urgenttttttt
i want a client side printing in jasper report after hitting print button on screen.i want a print dialog box.how can it is possible?
Hi Cau u please provide me a sample report Project Source Code the i can understand more Can apply for my customer.I am trying to create a report Which will List All available Fields and User will choose the fields and It will generate the Report
hi all,
I am facing a problem when i am using sub-reports. Problem is when i compile and execute the subreport with the main report, i am getting the below mentioned exception, but the same subreport if i run individually the data is filled and is displayed properly.
Error filling print… No filed reader for category
net.sf.jasperreports.engine.JRRuntimeException: No filed reader for category at net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource.getFieldValue(JRHibernateAbstractDataSource.java:234) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:815) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:779) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1109) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:767) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:690) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:515) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209) at java.lang.Thread.run(Thread.java:595)
if any one has solutions for the problem or have any sought of clue, plz help me out.
thanks.
Hi,
I have tried Jasper reports and BIRT reports in last 2-3 months. I found BIRT reports are far more better than the Jasper reports with many types of drill down capability..which Jasper report doesnt have
Cobus, I’m not sure what you mean by not being able to upload them, but there isn’t any compilation steps needed for vm files. Where are you trying to upload your vm’s to, and from where?
Hi
Have you tried working with the Velocity templates? I’m drowning at the moment - I got OpenReports up and running and it is displaying reports via Stored Procs. Now I need to add drill-down reports with Velocity it seems, but I can’t upload the .vm files - do I need to precompile them somehow? I can’t even seem to upload normal .jasper files - I’m using v2.2 of OpenReports and v1.3.0 of iReports to compile my JasperReports.
Any help would be greatly appreciated.
Thanks!
Barry, have you read my post: http://www.brianburridge.com/2006/06/04/how-to-call-stored-procedures-from-jasper-reports/?
Pages: « 28 … 25 24 23 22 21 [20] 19 18 17 16 15 … 1 » Show All
RSS feed for comments on this post. TrackBack
hi guys ..pls help me how to congigurejasper report using eclipse ide ..