I'm a newbie in Jasper reports, did some research and found three options for Dynamic report creation:
1) JasperDesign Object of Jasper reports Library
2) DynamicJasper
3) Dynamicreports
What ares pros and cons or differences between these options. I need to start my project As soon as possible.
I would appreciate your help to get a better overview.
Thanks
Depending on the complexity of what you are trying to do, Dynamic Jasper could be the best option:
It has a lot of examples and docs
(you have test sources, that you can find them in the bundle, to test all examples they give you)
Make released very often
(You have released from JR 3.5 to JR 6.0)
It easier and you need less code to write a dynamic reports, compared to using JR capabilities
I have seen more usage of Dynamic Jasper than Dynamic Reports
I wouldn't use Jasper Design object if I were newbie or I were not used to working with the JR's API.
Related
I'm new to Java and looking to learn Jasper reports. Are there any good online video tutorials for Jasper Reports ?. I'm working with Spring 4.x, Hibernate 5.x and MySQL database.
When I used this frameworks with Jasper report but i didn't find any video already I did not do anything specific.Firstly i described "datasource" and passed value to report after that i learnt how to define subreport.I think this approach works.You can do research in this way.
As asked by few other members, on similar line, I want to have landscape orientation for only one of my subreport. I am using iReport 5.6.0 and JasperReports 5.6.0.
I searched and almost all solutions suggest to have 2 separate reports and add/append them programmatically as mentioned here.
This solution is probably not ideal for me as I have 4 dynamic subreports(can produce variable number of pages at run time) and I want only third subreport to be landscaped. So, at run time it will be difficult to identify the point to append my landscaped report.
Questions that I have:
Is this native feature now introduced in any new version of iReport to support different orientation of subreport?
If no inbuilt support in iReport, how can I programatically add
subreport in between, if I don't know at which location/page the subreport will be added.
I tried to look for a solution in JasperSoft Studio as well, but not success.
Thanks in advance.
Starting with JasperReports v6.0 you may achieve what you want with a Report Book. It is basically a report bundle where each report can have a different orientation.
But since Jaspersoft Studio(with version 5.5.0) became the official design client for JasperReports, you will not find this feature in iReport. So starting with Jaspersoft Studio v6.0 you will be able to use it.
Cheers Jasper Reports expert,
I'm a bit new with Jasper Reports so thanks for any help.
We are investigating the use of Jasper Reports Server as our main tool to offer our customers the reporting capabilities they need. We are a Java shop but would like our clients to mainly interface with JasperReports Server for reporting needs (as opposed to writing a custom app for this).
We have a requirement to display scientific data (signal trace data) that is contained in a BLOB field (it's some standard format but not well known). I've considered a couple of options:
1) Find some cool out of the box support for this (this seems unlikely)
2) Deploy a custom jar file and reference a method that produces a complete chart displayable via JR Server (It really seems like I should have come across a way to do this by now, but haven't seen it).
3) Deploy a custom jar file to jasper and reference a java method that makes the data understandable to JRServer and use the built in charting capability (We could write any java needed but I'm not sure how to integrate with JRServer).
4) Write a simple servlet to serve up the image we want in the chart (alas, something I understand how to do!).
Question: which of these are real options and have I considered the best options?
Thanks
Wayne.
VERY unlikely
could be possible but needs a lot of research. Have you considered using JFreeChart Customizer classes? You can manipulate the renderer, the dataset (values) and nearly everything else of the given chart.
Do you want to define a new datasource? Or just use a function inside the report like:
parsemydata($F{blob})? Both is possible.
Put your .jar file into /var/lib/tomcat6/webapps/jasperserver/WEB-INF/lib/ (path on a debian squeeze with tomcat6)
if you want to use functions from a custom class in a report you have to import the class first, with: <import value="your.class"/>
Creating a new datasource is a bit more complex, and subject of another question.
something I don't know anything about.
I would suggest to have a look at ReportServer (http://reportserver.datenwerke.net/). It has good JasperReports integration, so if you find an acceptable method with Jasper this path is open to you. However, I would expect that if you have scientific data then you might need some custom charts (and maybe even dynamic ones). What we usually do in this situation is to use ReportServer to preprocess the data (script reports or dynamic lists) and use a specialized javascript charting library such as d3 (http://d3js.org/) to do the actual plotting.
What format is your data in, and what kind of charts did you have in mind?
I am using jasper reports in my project to generate html reports. But the generated reports are static. Now we want to add some interactive features in it, like simple sorting and searching of columns. This is preferably to be done the client side. How can this be achieved ? So far I have tried to embed jquery into the generated report with no luck. Does jasper report provide such kind of functionality?
Use parameters and re compile the report every time you want to filter the data.
With your meaning of the word "interactive", nope that is not possible. A report is only a report - a presentation medium that shows data in such manner that is required by the business rule. You can format data here. You can stylize it, add image and what not. A client side application is probably what you want.
Well, your exact requirement can be achieved if you publish the Jasper Reports on the Jasper Server. Once published, all your reports become interactive (For Charts, you must use the PRO charts and not the basic HTML charts but for tables, it works automatically.)
Once you publish it on the Jasper Server, the features that you get are:
Sort button with various types
Export the Report to many formats (PDF, XML, etc - more than 10).
Zoom IN and Zoom Out.
Bubble for your charts making them interactive, etc.
Yes, interactivity is possible in Jasper Reports, but the thing is that you need a Jasper Server Pro or Enterprise version for achieving this. If you are using a community version, it is impossible to create interactive reports. You can download the free trail pro version of jasper server for 60 days from this link https://www.jaspersoft.com/download
For much more details go through this link https://www.jaspersoft.com/community-commercial
Choose according to your requirement.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Background
Developing Java EE application with DynamicReports and so far it's sufficient for me. Recently I found DynamicJasper and I would like to know if it could be better choice.
I can see that DynamicReports may have better support and community.
Questions
What have been your experiences with both libraries?
Which offers better functionality?
What are strengths and weakness of each other?
Thank you!
This question touches a few ways to create reports using the JasperReports API (either directly or indirectly):
iReport
JasperReports API
DynamicJasper
DynamicReports
DynamicReports (DR) and DynamicJasper (DJ) are two free and open-source software tools that abstract (and simplify) common tasks with the JasperReports API. If you are considering developing reports programmatically, these tools can cut the development time.
The DR and DJ API packages have the following features in common:
Dynamic design
Dynamic column widths
Stable
Mix iReport templates with code
iReport
iReport is a user interface that hides the complexity of calling JasperReports methods directly. In other words, iReport is a fancy and friendlier way to develop reports than coding Java calls manually. The end result is the same: a compiled report (.jasper) file.
JasperReports API
The JasperReports API provides programmers with a set of Java classes to have a computer create reports based on business needs. The API makes it possible to, for example, develop a web site that allows users to pick the columns they want within a report and then have the report template be created on-the-fly. After the template is ready, a user can then run the report to see the results.
One feature that iReport lacks is the ability to dynamically resize column widths. By using the JasperReports API directly, programmers can create a report template with the optimum column width for the report's result set.
The problem is that the JasperReports API is extremely complex, and parts of it could use more documentation.
DynamicJasper
The DynamicJasper website notes the following benefits over the JasperReports API:
Automatic layout
Barcodes
Clean Excel support
Struts & Grails support
The API examples show a good working of object-oriented principles. The web site offers many examples, and the Javadocs are sparsely commented. The forum is more active than DynamicReports.
Update: The project is now on GitHub. No more forum, but you can request a Professional Support
DynamicReports
The DynamicReports website notes the following benefits over the JasperReports API:
Inherited designs
The web site offers many examples, but unfortunately the Javadocs do not have a lot of comments. Further, the forum appears less active than either JasperReports or DynamicJasper.
Summary
If you are happy with DynamicReports I'd say stick with it, otherwise try DynamicJasper.
I've just spent a few days using and evaluating the different reporting options above and thought I would add my 2 cents into the mix.
I've built the same report (Profit & Loss) in JRXML, Dynamic Jasper and Dynamic Reports.
I needed a solution which would output well in both PDF and excel formats and had the ability to handle dynamic columns.
Here's what I found:
JRXML
Found it very tedious to use with and without using iReport. I've had experience using JRXML before and I still found it a real battle to get the report to display correctly in both PDF and Excel. I had to use a lot of workarounds by hiding and displaying some fields based on if it was going to be PDF or excel. Dynamic columns are not handled well.
Dynamic Jasper
At first I was finding Dynamic Jasper pretty good to work with but had some problems with having absolute control over the layout and putting additional controls on the report. It seems that if your report is column based than it works fine. I couldn't work out how to add a subreport to the detail section and had to add it to the group header or footer.
Dynamic Reports
In my opinion Dynamic Reports is the most flexible and easiest way to create dynamic jasper reports. The syntax is easy and intuitive and I found it very quick to get up and running. You do column based report like Dynamic Jasper but also have the options to drop components strait onto the title, detail or other areas of the report. It uses a flow layout so you just drop components into the report and the display in that order. Export to both PDF and Excel was consistent.
The last and most significant benefit of Dynamic Reports is the support and update activity. DynamicJasper has not had forum activity or support in well over half a year while DynamicReports is not only actively updated but also the developer (Ricardo Mariaca) actively monitors the forum and responds quickly to questions.
About a year ago, I came across DJ. My experience with DJ was the best as there were several minor glitches that needed workarounds. However, I found those problems when the project was almost completed and as those workarounds already existed, I continued to use DJ.
After few months, I found DR and learnt that DR has a better structure than DJ. My next project will definitely use DR.
To be frank, I use DJ 3.1.x series and did not try any newer version. I also did not use DR extensively yet.
I am a big fan of DynamicJasper but recently I switched to DynamicReports 4.0.1 (at the time, DynamicJasper latest release is 5.0.3).
With much better API in terms of readability and usability, DynamicReports provides much more flexibility to design reports on the fly. There are also plenty of samples on its website that fosters new ideas and some tutorials that help you start fast. This link is a good starting point too.
The only issue I had starting to use DynamicReports was that with JasperReports and DynamicJasper, I was used to create the JasperReport first (design) and then pass the JasperReport object along with a datasource to JasperFillManager.fillReport(...) method to create the JasperPrint object.
With JasperPrint, the only thing is to set the data source before creating the JasperPrint by report().toJasperPrint() method.
You can lookup for usages of a component builder or any utility in its source code to see how to make use of a special feature.