How to integrate ECharts with BIRT/Pentaho? - charts

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.

Related

BIRT report - Getting HTML report with paging output

I want to be able to integrate birt with my application. I need the output to be in HTML format - preferably with paging or ability to scroll as the reports may become lengthy.
Can anyone provide any examples or just a basic rundown as to the best method of implementation this can be done in?
I have used BIRT and can make the reports I just don't 100% understand how to deploy them even after looking at a lot of resources including Acuates own.
You need a report and the BIRT engine to turn that report into HTML. The engine can be embedded in your own Java application or use their free F-Type server to embed with one of their APIs.
Multi-page export can be accomplished using:
their JavaScript API and either the free or commercial BIRT Viewer
their default HTML emitter with an external CSS3 file for page layout
customize or create a new HTML emitter with the HTML tags that you want
Integration documentation is at
http://developer.actuate.com/resources/documentation/ihub31/integration
http://developer.actuate.com/deployment-center/integrating-birt-into-applications/

Scientific Charts in Jasper Reports Server

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?

Filters in Eclipse Birt

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.

interactive 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.

Looking for an interactive pie chart to use with GWT (without extern communication)?

I'm looking for a stand-alone Pie Chart which I can use in a GWT application. The Chart should be interactive, so that I can react on user input (read mouse clicks on the chart).
I've already looked at Google Chart Tools with GWT Visualization. This is exactly what I want. A simple to use PieChart class with user interaction and a simple and comprehensive data input. Except that the data is transfered to Google for the rendering part. The data should not leave the client or our server.
Have you tried Fusion Charts? Here's the Pie Chart showcase. Its a Flash object hence you will need to use JSNI to embed the object into your widget or use a library like GWT2SWF to do it for you.
I have used Fusion Charts + GWT2SWF combination in one of my products, and would recommend it to anyone looking for a interactive flash charting tool (outside of google's toolset)
A colleague of mine found following library: GChart. Rather then using Flash we'll try to draw our own. Not sure how easy this will be.
You mentioned:
"The Data should not leave the server"
With Google visualization APIs (as opposed to the chart apis) the data remains on your server, only the code is downloaded from google.
However, if you meant that you shouldnt need access to google at all, then GCharts is the only remaining and a pretty good option.
Check out GWT-RCharts hosted on http://code.google.com/p/gwt-rcharts/ . It is stand alone i.e doesn't have external dependency like Visualization. The API works on SVG/VML specification so no plugin dependency. You may find it quite easy to install, implement and use. You can find the demo at http://gwt-rcharts.appspot.com/