简体   繁体   中英

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 (ie "country") where i can choose the different values (ie "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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM