Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BIRT Variable - How to create and use?

Tags:

java

html

birt

I need to create a global report variable to get a variable of my first table, then use it in my last table to do a calculation.

I'm new with BIRT and don't found a guide to do it.

Someone can explain me how I can do it ?

like image 774
Lucas Silva de Freitas Avatar asked Nov 04 '13 10:11

Lucas Silva de Freitas


People also ask

How do you declare variables in BIRT?

There is a "Variables" section in the outline view where we can define such global elements. As you can see on your second screen there is a "Variables" element in the palette. Furthermore, these variables can be graphically dragged in the expression builder of any BIRT element, which is very convenient.

How do I add page numbers to a BIRT report?

When you enter the BIRT Report Editor, and switch over to the master page tab. You should then see Auto Text category display on the left hand side. Within this option you will then see options such as ('Page', 'Total Page Count', Page n of m', etc).

Why do we use BIRT reports?

These tools are used to create reports, data visualizations, and charts that can be embedded in Web-based and rich client applications. Information gleaned from embedded BI tools such as BIRT may be used in both real-time decision making and to track and analyze historical data or ongoing developments.


1 Answers

We initialize a global report variable in "Variables" section of the outline view:

Global variable

Then we can set and get its value from any place of the report:

myvalue=vars["myGlobalVariable"];

vars["myGlobalVariable"]=myvalue;

Notice global variables we declare like this are also available in the expression builder, which is very convenient.

like image 122
Dominique Avatar answered Sep 22 '22 19:09

Dominique