reportbirt

BIRT, How to get Dataset Row Count using Javascript


How can I get Dataset Row Count from Javascript function in BIRT. I tried searching this in BIRT exchange, but the only solution offered there is to have a new dataset getting count of values of required data set. This wont suit my needs. Is there any way to obtain it using dataset events.


Solution

  • An easy way would be to count dataset items in a report variable.

    Important 1: This approach works if and only if the dataset is bound to at least one report element (a table, chart, data element, etc.). For example, it won't work if the dataset is only invoked to fill a list of selection choices of a report parameter.

    Important 2: In the body of the report, this variable can only be used after the first report element using the relevant dataset, otherwise it won't be initialized