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?
Related
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.
I'm looking for a report engine which may:
connect to data source via JDBC
create logic data set by grouping/aggregating the raw data
include a data filter on the top of each report, which allows my client use the report interactively
add custom charts, in my case, it's ECharts https://github.com/ecomfe/echarts
support multi-tenancy paradigm (new requirement)
Now BIRT and Pentaho are the two players on my table.
For pentaho, it's really hard to find useful document to at least clarify if it's capable. Please if you're familiar with it, let me know if pentaho community version meets my requirements.
For BIRT, I've found evidence it support my first 3 needs. But for custom charts, I can only find examples/docs about adding custom IMAGE/SVG charts. As ECharts is based on canvas, I'm not sure if it's possible to integrate ECharts with BIRT.
Thank you!
Yes, it is possible to integrate javascript charts in BIRT. Basically:
Select the top-level element of your report outline -> Script tab -> clientScripts
Include here your echart resources (.js and .css) using "head.js" (see link below for more informations)
Add a text element to the report
Set the type of this new element to 'HTML'
In a script tag, initialize your echart object in a "head.ready()" instruction (see link below for more informations). The tricky part is to understand how to use a server-side dataset in a client-side chart within this html script.
You can find more informations and a full example of a such report here, this example embeds a jvectormap in a birt report. Furthermore, see a live demo here, where a JIT chart is integrated in a BIRT report.
However since these charts are created using a client-side framework, obviously BIRT won't be able to export them in PDF format. You can see in the live demo linked above, how a BIRT report can easily handle a different output when users export to PDF.
You can do it in Pentaho, but which tool to use it's a matter of debate.
Using Pentaho Report Designer:
- Connects to DBs using JDBC;
- Allows grouping rows based on a field or fields and calculating functions such as running sums;
- Can use selectors (single or multi-valued selectors) to interact with the report, passing the selector values to the queries;
- As far as I can tell, you don't have many options to choose a specific charting engine.
However, you can use CCC as the charting engine, which is a Protovis based Javascript charting engine, cross-browser compatible (for the most part), renders SVG charts with a decent fallback for IE (I believe the fallback is flash but I'm not sure if it changed recently) and produces decent looking charts.
If you HAVE to use that chart library, then I suggest using C-Tools dashboards instead, where you can embed as many different JS files you want and you have full control over the JS and CSS of the page. But most of the reporting functions from PRD will have to be implmented by you.
I have to create a Web Application using Eclipse Birt, and Apache Tomcat to have it on line.
One report will include a table and a chart, both taking data from MongoDB.
While I succeeded in designing a simple report that accepts parameters from Eclipse Birt suite (based on the tutorials on the Eclipse website), I have troubles in handling a more complex report.
Actually, I wish to create a dynamic filter on-the-fly operating on a single column (i.e. "country") where i can choose the different values (i.e. "USA", "UK"...) and then have the rest of the data visualized in the report be refreshed correspondingly.
I also wish to place the filters in a different section of the report (header or footer...) in the same web page, and not have them chosen before opening the report like the parameters of Eclipse Birt.
Said it differently, I would like to have lookup-fields in the header of the report, to automatically filter the data displayed, so to refresh the query behind the report.
May be the solution could to integrate a report built with Eclipse Birt and MongoDB in a Dynamic Web Application using Eclipse too? Or in a GUI in Eclipse like WindowsBuilder?
Has someone faced this task and can help me?
Thank you so much,
Federico
There is not a simple 'out of the box' solution for what you are describing. But there are solutions.
The first thing to understand is that the BIRT reports as delivered via Apache Tomcat, are intended to be stagnant not dynamic. BIRT pulls the data set, then filters it and delivers it in HTML. This link describes the order of events in report creation.
As far as I am aware there is no way to actually provided the function of filtering the created report in BIRT after the report is created.
But, you can provide the illusion of a filtered report, there are two common methods.
Create multiple tables on one report, representing the display as you want it displayed, then use a button command to hide or show the appropriate tables.
Create multiple reports and have buttons the pass new parameters to a new report that opens in the same window.
There is a third approach that can be used, that gives you similar functionality. Use Cascading Parameters (right click report parameter in Outline > New Cascading Parameter Group). This of course is not the function as you envision it in your description, but can give the results you seem to be wanting.
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.