Filters in Eclipse Birt - eclipse

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.

Related

BIRT Report - using Library as basis for report design files, adding new Report Parameter not reflected in all report design files

BIRT Report - using Library as basis for report design files, adding new Report Parameter not reflected in all report design files.
I designed several report parameters into my library file and created 40+ report designs from it. Now I'm adding a couple new report parameters to the Library file that I'd like to see in all of my Birt Reports. If I open a report design file, Eclipse signals me that the library changed if I modify something on the Master Page, but not when I add a new Report parameter to the library file. Is this a defect or do I have to got to each and every report and add the new report parameters manually?
I saw that for individual Report parameters while editing the report design, there is a button in the Properties (bottom window) to "Restore Properties from the original library item", if it were manually overridden in the report, but nothing to reflect additional parameters.
Here is my library outline showing my parameters missing from the report; followed by what my report reflects.
Library Report parameters
Design shows missing Report parameters
... Is this a defect or do I have to got to each and every report and add the new report parameters manually?
This is intended.
You'll have to add each parameter manually.
A BIRT library is a collection of items like layout items, data sets, data sources, report parameters etc.
A BIRT report is more or less the same, the difference being that a report has a body.
Individual items in the report can reference library items.
But there is no such thing like an "item group" - which you would need.
But if you have a lot of reports and a lot of new parameters, you can use the BIRT design engine API (DE API) to open the reports and add the parameters programmatically. Since examples for using the DE API are rare, doing it manually will probably be faster than creating a program for this. Aapprox. 3min x 40 reports = 2h for doing it manually, developing a program will take you at least twice as long, but could be useful in the future.

Project Server SSRS report - One report dynamically including multiple reports

I am not an expert at SSRS but have played around with it to know my basic way around it but I am stuck on this one. This is for Project Server 2010. I am working on a task to create two reports, and combine them at the end. First report, reportA is for a single project, pulling all of it's information. reportB is for a "Portfolio" of the projects on the server.
I am being asked to create a report of them merged. I guess we will call this reportC. reportC will have reportB at the very top, listing all of the projects and other basic information. If reportB has 10 projects listed, 10 reportAs (having information for every single project listed) and all their information, will be aggregated to the bottom of the report.
I tried looking into subreports but do not think this is what I am looking for because it doesn't look as if subreports can be added dynamically, unless I'm wrong. Any ideas on how to easily complete this? I appreciate any help I can get.
EDIT: Here is an example. No it wont be aligned like that. They gave me their example in Excel. It does not necessarily mean that reportC has to be through Excel. Could this be possible running a script of some kind or similar?
Basic Example
I recently did something very similar myself.
What you could do, is in report A, place a table at the bottom where each row is a sub-report (report B). This would allow for all the passed data (name, report id, etc.) to generate visible sub-reports beneath the origin report.
Then, if you want each sub-report on its own page, you can go under group properties and add a page-break after each group.

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.

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.

Return BIRT calculated report values back to custom web application for further processing

I'd like to run a report in a custom application (no birt viewer, direct integration of the report engine in the application code for rendering reports under the hood and providing links to the final documents).
After rendering the report I need to read back specific values which were calculated in the report - e.g. for pushing it towards a webservice of a different application.
Imagine an invoice report with master and details which calculates in the master section then the aggregated payment sum of all invoice details. If I would need to pass the calculated payment sum to a payment service from the appplication (not in the report!) - how would I do that ?
I've seen DataExtractionTasks in the Birt API. However they seem to be heavily query-related in the rare examples I found and I am not sure if they would somehow work with non-resultset data as well.
I tried to use GlobalPersistentReportVariables and access them after rendering the report via the API - however via the API they always seem to be null. Not sure if this is the "right way" to access calculated report values. I think they are mainly provided for sharing data in between different report elements like tables.
I certainly do not want to duplicate the report logic in the application just to calculate the payment sum again.
While I think that in theory the DataExtraction task would be the right thing I couldn't get a simple report element's (e.g. dynamic text element) value for publishing it somewhere else.
I have it working now by abusing the holy appContext (general-purpose-throw-in-anything thing) for getting the required data back into my application (report writes calculated value into the appcontext - application reads in after rendering the report).
First is the integration --> http://wiki.eclipse.org/Birt_3.7_Migration_Guide
Secondly you have to create a custom XML plugins for BIRT.
added that plugin into ur integrate BIRT.
Now render ur report in XML format(Remember the XML format will defined in ur plugin, so give such format that u can read it easily with any javascript,jquery or Java file only )
Now do any calculation/manipulation u like.
In my case, i was having 2 context file i.e.
Context-1(Myapplication.war)--calling-->> Context-2(BIRT.war with customized XML plugin)
I called BIRT report using javascript XMLRequest method with
URL: "http://localhost:8080/birt/framset?_report=GraphReport1.rptdesign&_format=xml"
And the reading xml format in javascript & showing the customized jquery graphs according to data.