Tag Archives: rownum

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

Advertisements
%d bloggers like this: