Discussions
-
Dynamic Multi-Value Parameter Example using ListBox
How to pass a Multi-value Report Parameter (List Box of Type String).<br /> <br /> Most report examples show how to create reports with single value report parameters. The List Box Parameter Type has the ability to allow multiple selections. When using parameters natively in the "Parameter Tab" of a specific Dataset in the…
-
Multiple columns within a list
List components normally draw data from top to bottom...<br /> Data1 Data2 Data3 Data4 Data5 <br /> Data6 <br /> <br /> ...but you can also use them to present data from left to right as well:<br /> Data1 Data2 Data3 Data4 Data5 Data6 <br /> <br /> To draw from left to right create a new CSS style using the predefined name…
-
Transposed data sets
Sometimes it is useful to convert columnar data of the form:<br /> Key1 Value1 Value2 Value3 Value4 etc... A 1 2 3 4 B 5 6 7 8 <br /> <br /> ...to row data in the form<br /> Key1 Category Value A Value1 1 A Value2 2 A Value3 3 A Value4 4 B Value1 5 B Value2 6 B Value3 7 B Value4 8 etc... <br /> <br /> This can be…
-
Polynomial curve fitting on charts
The attached example contains a chart with linear and cubic curve fitting. The script in the chart can be modified to fit to any polynomial order (max 50).<br /> To use:<br /> Create an extra series in your chart to plot the regression line. Set the data for the series to be the untrended, values and format the series as…
-
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…
-
Passing parameters from button click
<p>Hi</p><p> </p><p>I have a report which loads up some summarised data into some bar charts using 5 datasets, the data is filtered using a date which at the moment is set today's date. What I want to be able to do is click a button to go back one day or forward one day. I am struggling to work out how to get a parameter…
-
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…
-
How do I fill the empty spots in my Crosstab with zeros?
<p>I have a Crosstab that ends up with data like this:</p><p> </p><p><img src='http://i.imgur.com/g3U4K8R.png' alt='Posted Image' class='bbc_img' /></p><p> </p><p>How do I fill the empty spots with zeros? Thanks!</p>
-
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…
-
Highlighting the Top N Bars in a BIRT Bar Chart
This report design demonstrated one way to highlight the top few bars in a BIRT bar chart.<br /> <br /> In this example, the Classic Cars database is used. A simple query brings in the Customer Name and their Credit Limit. Sorting is applied in the query to list the data from highest credit limit to lowest credit limit.…
-
BIRT Change Color of Chart Bars Depending on Output Format Report
This report design is based off the sample BIRT database. The report consists of a table showing customer who have credit limits over $120,000. In the footer, there is a chart of these values. If the output is html, the bars become a dark blue. If the output format is anything else, the bars are the standard yellow color.…
-
Crosstab Horizontal Page Break Example
This example report shows the use of horizontal page breaks on a crosstab. This feature was added in the 2.3.0 release. The report includes a title in the header of the master page and a crosstab showing sales by country, grouped by year and month. The horizontal page break can be set by selecting the crosstab, going to…