Category Archives: Eclipse BIRT

BIRT :: Internet Explorer (IE) compatibility problem

In case Internet Explorer needs compatibility mode to show the report, try adding the following code on <head> section to the webapps/birt/webcontent/birt/pages/layout/FramesetFragment.jsp (line 46)

<!-- Mimics Internet Explorer 7, it just works on IE8. -->
<META HTTP-EQUIV="X-UA-Compatible" CONTENT="IE=EmulateIE7">
Advertisements

BIRT :: Cascaded Parameters

BIRT provides the capability to use dynamic parameters to present the end user with a list of choices that are populated from a dataset. This is very useful but can cause issues when the dataset returns many rows of data. To reduce the number of items in any parameter, the developer can use a cascaded parameter, which allows multiple levels and multiple datasets. When the user selects the first level parameter in a cascaded parameter group the second level in the group is automatically re-queried…….

Source : BIRT Cascaded Parameters

BIRT :: Date tips & tricks

Get the first day of month

Use the following expression to get it
BirtDateTime.addDay(BirtDateTime.today(),1-BirtDateTime.day( (BirtDateTime.today()) ))

Get the last day of previous month

Use the following expression to get it
BirtDateTime.addDay(BirtDateTime.today(),-BirtDateTime.day( (BirtDateTime.today()) ))

Get the previous quarter day (since now)

Use the following expression to get it
BirtDateTime.addDay(BirtDateTime.addQuarter(BirtDateTime.today(),-2),-BirtDateTime.day( (BirtDateTime.today()) )+1)

BIRT :: Rownum for sorted crosstab

  1. Put something like: var i = 0, in your initialize script.
  2. Then, instead of trying to use your rownum field as a dimension, just put a 2 column / 1 row grid in where your name field is.
  3. Put the name field in the right cell and a dynamic textbox in the left cell. For the dynamic textbox expression, put i++; i;.
  4. Now, for each row, the variable i will increment and then display in the textbox, giving you a row number.
In case you have a lot of crosstabs in the same report,  put more than one variables on the initialize script

var i = 0;
var j = 0;
var k = 0;
var l = 0;
var m = 0;
var n = 0;

and repeat the above steps.

Source: Rownum for sorted crosstab

%d bloggers like this: