interactive jasper reports - jasper-reports

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.

Related

JasperReport - different orientation(landscape and portrait) in same report

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.

How to integrate ECharts with BIRT/Pentaho?

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.

How to create JapserServer report templates?

I'm pretty new to JasperReports, Jaspersoft Studio, and JasperServer but I've got a JasperServer instance up and running and have been using it to create reports from Ad Hoc views. This works well but I'd like to make some report templates so that reports run from JasperServer can have branded headers/footers etc.
I worked through this tutorial and was able to create what I thought was a fine template but when I try export it as a JasperServer template I get all sorts of validation warnings and indeed trying to run reports using it from the server results in errors.
Here's an example of the warnings I'm seeing:
The style ChartValueAxisTickFormat was not found in the template
And the errors I get on the server when trying to use these templates look like those described here. I have tried using templates without any text fields or variables though. In fact, the unexpected tokens it complains about are usually actual field ids... do I need to anticipate the fields that would be used when creating a template? Wouldn't this defeat the purpose of having templates for reports created from ad hoc views?
Anyway, there's quite a lot of information out there around creating templates for Jaspersoft Studio (iReport) reports but not a whole lot on templates for JasperServer reports.
It seems like there's something fundamental about templates for JasperServer reports that I'm missing. I'd appreciate any help with either the issues I am describing or being pointed toward better documentation for creating these templates specifically.
Edit:
I'm using Jasper Studio Profession 5.5.0.final on the desktop and a Jaspersoft BI Professional for AWS 5.5 instance as the server.
Report Template as in tutorial you have linked are for Jaspersoft Studio / static reports only. Adhoc templates are different types of objects which are described here
I have encountered the same errors, and I have solved it by simply adding a styles to my report, in other words:
In the outline of your report, Right click on Style -> create Style, then just change the name of the style by each name of missing styles apperead (for example, ChartValueAxisTickFormat).
After creation of 55 styles in your report template in jasper Soft Studio, save the report, then export it as report template.
I hope this will help you.

Reporting system with build-in end user reports designer

Good day everyone! Sorry for my english, it is not my native language.
I have a system with server, desktop clients and web-clients. System writing on .net, winforms, asp.net mvc. The end user needs to view simple reports in web-clients, change reports parameters and download reports in popular formats (doc, xls, pdf). Also they need to create and modify reports in our system. In ideal case - in web-client. If it hard or impossible - in desktop client.
I start to see in Crystal Reports side, but as I understand, Crystal Reports does't have build-in report designer. Or I wrong?
I will be very thankful for educating about CR and for recommendation other reporting system with build-in end user reports designer.
You can try our SharpShooter Reports. It suits all the requirements you've mentioned: WinForms, WPF and ASP.NET MVC components (even WinRT if you ever need it), end user report designer (desktop version), export to XLSX, PDF and others.
Moreover, it has multilanguage support and a good support team including Russian-speaking persons as well ;).
If you use Clear Reports then you can use the AdHoc reporting in the browser. See the online demo.
Or for professional users the remote designer. See the online demo.
Clear Reports can also read your existing Crystal Reports templates.
You should try DBxtra, it's very user friendly, given that you don't need to have knowledge of SQL or programming, given that it's drag and drop; althought if you have such knowledge you can do even more amazing reports.

DynamicReports vs. DynamicJasper [closed]

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.