-
BIRT 3.7 Released
BIRT 3.7 has been releaed. To find out what is available see the BIRT 3.7 New and Notable.<br /> <br /> http://www.eclipse.org/birt/phoenix/project/notable3.7.php
-
Dynamic columns based on parameters
Attached are two examples that use the DE API in the beforeFactory script to add or drop columns.
-
Autoclick a hyperlink in a report
Put unique bookmarks on the data/report items that you want to auto click on. For example if you have a label that you want the hyperlink to go to google, put the bookmark in as "linktogoogle". Next add a text element at the bottom of the report that is similar to:<script language="JavaScript">function invokeDrill(id){ var…
-
hide dial outline in meter chart
Chart script to hide dial outline in meter chartfunction beforeDrawSeries( series, isr, icsc ){ importPackage(Packages.org.eclipse.birt.chart.model.type.impl); if( series.getClass() == DialSeriesImpl){ series.getDial().getLineAttributes().setVisible(false); }}
-
API To Iterate over the TOC
Attached is a report and a class file that shows how to iterate over a reports toc entries and display the page that entry is located on.
-
Change Bar Colors for Staced Percent Chart
Look at the chart script. A beforeDrawDataPoint and beforeDrawLegendItem script are used to set the color of specific bars based on the optional grouping field.
-
Turn off toolbar buttons within a report
This report has a text element that runs a script which locates the toc and exportReport elements and sets their display value to none.<script type="text/javascript"> function hideToc(){ var toc=document.getElementsByName("toc"); if( toc.length > 0 ){ toc[0].style.display='none'; } var…
-
Combine CSV Files
This example uses the following open event of a scripted data set to implement this feature:importPackage(Packages.java.io);directory = new File(params["fileDirectory"]); files = directory.listFiles();csvfiles = [];for( i=0; i<files.length; i++ ){ if( files[i].toString().endsWith(".csv") &&…
-
Drop Columns dynamically using DE API in script
This example uses a beforeFactory script to iterate over a set of parameter values that are then used to drop individual columns in a table.
-
Java Example of Creating a report with a Gantt Chart
This is an example class that creates a report that uses a scripted data source and a Gantt chart.<br /> <br /> For 3.7.1 and higher remove the setBirtHome and add the height and width for the chart bounds: ChartWithAxes cwaGantt = ChartWithAxesImpl.create( ); cwaGantt.setType( "Gantt Chart" ); //$NON-NLS-1$…
-
Change Series Label Font size Based on Number of Points
This example swaps the data set for a chart based on a paramete and changes the font size of the series label based on the number of data points in the dataset. See the beforeFactory script and the beforeGeneration chart script.
-
BIRT Palette Examples
See BIRT World for detailed description: http://birtworld.blogspot.com/2011/10/birt-chart-palette.html
-
Push HashMap to Chart from Report Table
Look at the script on the table detail row to see how a hashmap is created and loaded. Then look at the chart script to see how it is read and used.
-
Time string sum
This example assumes a dataset retruns a column with "hh:mm:ss" strings. A column binding is then used to conver this to seconds. An aggregation element is then used to sum all of the seconds and a final column binding converts this back to string with the format"hh:mm:ss".
-
Hide table detail rows based on parameter
This example checks the value of a parameter in the beforeFactory script to determine if the detail rows in a report should be displayed.if( params["HideDetail"].value ){ reportContext.getDesignHandle().findElement("mytable").getDetail( ).get( 0 ).drop();} <br /> Note that the table must be named in it's general…
-
center group label in detail row
This report uses three aggregate values that are in the binding tab of the table and an onRender script to hide all instances of the data item but one. The one that is displayed is in the center of the the number of detail rows.
-
DE API GANTT Report from Sample DB
Example class that creates a Gantt Chart report using the sample database.
-
Client side script to show detail rows from chart and table
Example report shows how to add client side script that can be called from html button or mouse over on a chart to show detail rows. Caveat - Only works with one page reports.
-
Flip Tabular rows and columns using a crosstab
Simple example that uses the vertical orientation of the crosstab to flip rows and columns of a simple scripted dataset.
-
BIRT 3.7.2 Feature Examples
http://birtworld.blogspot.com/2012/03/birt-372-new-features.html<br /> <br /> Example reports showing new features in BIRT 3.7.2. See the blogpost.
-
Adding a New Chart Type 3.7.2
See orginal code:<br /> <br /> http://www.birt-exchange.org/org/devshare/deploying-birt-reports/1345-adding-a-chart-type-to-birt/<br /> <br /> This code revises the segment chart for BIRT 3.7.2
-
Use script to move bars to for a bullet chart
This example uses scripting to move bars of two series on top of each other to form a bullet chart.
-
DE API Add Chart With Drill Through
Java Class that uses the DE API to open a template and add a chart to it. The chart has a drill through added with the Chart API.
-
Change Aggregate Function on Chart Series
Example report that uses beforeFactory script, a parameter and CE API to change aggregate function on chart with optional grouping.
-
Add Data to Chart
for more details see:<br /> <br /> http://birtworld.blogspot.com/2012/05/add-values-to-birt-chart.html
-
Chart Zoom with Interactivty
Look at the BeforeGeneration Chart Script, the script tag function and the interactivity for the y-axis.<br /> <br /> Also read over this:<br /> <br /> http://birtworld.blogspot.com/2010/05/more-on-chart-interactivity.html
-
Extend Area Chart
See the following blogpost:<br /> <br /> http://birtworld.blogspot.com/2012/06/birt-area-chart-modifications.html
-
Radar Chart with script modifications
See the chart script for details. Enter 10102 for the parameter value to see the effects of the script.
-
Script to add a Pie Chart to a report
See beforeFactory
-
group chart scale change
I used a computed column on the table to calculate a chart scale max for each group item. The data item containing this value has an onrender script to set a global variable. A chart script was used set the max on the scale based on this value.