-
Using DEAPI to modify BIRT Report Design
A reporting application typically generates a report from a report design. Sometimes business logic requires programmatically changing an existing report design before generating the report.<br /> Here is a simple example that replaces a data set element with an image element using the BIRT Design Engine API to modify the…
-
Conditional Drill-Through
The attached BIRT project illustrates two separate methods of implementing a conditional drill-through. In the examples, sales data from the sample database is used to build a summary report. On that summary report the user is able to drill-through to a detail view. Based on the profit margin threshold (40%) they will be…
-
Rendering a Table with Rounded Corners
The attached report design can be run as-is. The styling relies on four images (the rounded corners) and some CSS-elements. The images and the styles are embedded in the report design, so there are no external dependencies to running the report. The data rendered are from the default Classic Models database installed with…
-
Create a dynamic group by extracting a substring
The goal here is to extract a constant portion of a string and use that portion to dynamically create a group on a table. The example will use the sample Classic Models database and attempt to extract the year from the product description. For example a product with a description of "1962 Aston Martin" will be included in…
-
Add a table with a fixed header row
The report actually uses two table to create the illusion of a fixed header row. An iFrame holds the detail rows and allows them to be scrollable.<br /> NOTES:<br />* Run the report with HTML output format to see the effect. Running the report in the Interactive Viewer (either in BIRT or your applciation will render the…
-
Data mapping example
This sample will map the value of "0.0" to be displayed as "N/A" on the finished report. The column headers will indicate the mapping method used, so use that as a guide. Val1 is mapped via an in-line expression on the Data Item. Double-click the Val1 data item to see the expression. Val2 is mapped via a cell-based map set…
-
Dynamic Query Modification
This example uses two parameters to modify the source for a query used to build a table on a report. The parameters are added to the query text dynamically from the beforeOpen scripting event on the Data set. In that event the query text is modified by over-writing the this.queryText variable. A customer name and product…
-
Parameter-Driven Bar Chart Formatting
The bar chart in this sample has the color changed to RED for the bar corresponding to the pProdLine parameter value supplied at run-time. Only one scruipt was modified to get the job done.function beforeDrawDataPoint( dph, fill, icsc ){…
-
Conditional Text Formatting
The attached sample uses a Regular Expression to parse a text field and update the formatting for a specific string. The string in this case is a user-supplied parameter. <br /> <br /> The report features a single table with three columns. The first two columns use Data Items to get the values displayed. The third column…
-
Connection Profile to Netezza JDBC Example
This report uses the the JDBCConnectionProfileStore.xml file in the C:JDBC folder as the connection profile to locate the Netezza data source. Within this file, make sure to enter your Netezza username, password and IP address. Also make sure your jarList setting in the file points to your Netezza JDBC jar file. Mine is in…
-
Alternate Background Colors
I have an easy way to show alternate colors in BIRT. There may be other ways as well.
-
BIRT Easy BreadCrumb
This rptdesign uses csv as an input and shows the hierarchical data with breadcrumb feature.<br /> <br /> Zip file contains rptdesign and CSV sample data.<br /> <br /> -Copy the CSV file into local machine.<br /> <br /> -Change the datasource to point to a folder which contains the csv file<br /> <br /> - Run a report and…
-
Dynamic Binding of IN (LIST) Parameters
Birt allows for dynamic creation of queries in the Propery Binding tab of the Data Set Editor, as inselect columnA, columnB from tableA where columnC = ? and columnD in (" + params["VALUES"] + ") <br /> to allow for passing a variable number of "in (list)" query parameters. However, since the list (comma-separated list of…
-
EclipseCon 2009 - Using and Extending Eclipse Data Tools (DTP)
The Eclipse Data Tools Platform (DTP) project provides a number of key exemplary end-user tools for working with data sources (databases or other sources). Whether your task is working primarily on a data source or to build data-centric applications with Eclipse, DTP can help. We'll start with an overview of DTP and the…
-
Reusable library for reloading a report
Attached is a library (and sample report that uses the library) that contains a text item. This text item when included in the beginning of any report will reload the report on an Interval. This interval is a user property in milliseconds. To use this report item just drag the reloadText Text item from the library and set…
-
Framework for adding comments to a BIRT report
Please note that this is just an example framework and is not intended to be production ready. Attached are the Information Console files, the library and a sample report that uses the library. This framework uses an Open Source web editor FCKEditor and MySQL database to store the comments. I would like to thank Ronny Zach…
-
Dynamic Content Creation in BIRT 2.3.2
Attached is an example of a BIRT report that dynamically created its content based on parameters. There are two parameters on the report. Each is a comma delimited list. One is a list of column headings the other is a list of the data fields. Obviously the both have to be of the same length.<br /> <br /> This is a version…
-
Using a Multivalue parameter in a in clause
This is a sightly different (and simpler IMHO) than this post:<br /> <br /> http://www.birt-exchange.com/devshare/designing-birt-reports/688-using-a-multivalue-parameter-in-an-in-clause/#description<br /> <br /> In my query I have something like this:where PRODUCTLINE in ('****') <br /> and in my beforeOpen…
-
Dynamic Formatting of Report Items
In many cases there are requirements where the format of a specific report item is not known at development time. In these cases the format is supplied at run time in either the form of a parameter or another column in the data set. The attached example dynamically changes the format of one report item based on another…
-
Advance Localization Technique
There are many cases where a user needs to run a report in a locale that is different than their own. For example a custom service representative in New York that needs to run a statement for a customer in Japan. <br /> <br /> The simple way to do this is simply add __locale=lang_COUNTRY to the URL that executes the…