Profile

Sunday 12 June 2011

Web intelligent: using variables on report.

Variables can be created in Universe Designer or build into the Webi report.  Using the sample database, a US company has sales revenue data collected from multiple states. Let’s assume multiple states charge various percentage of state corporate tax.
There are States and Sales Revenue data in the database which being retrieve to build the web report.  A variable is needed to be added to calculate the amounts of the State Income Tax from three different states.
1. From the exiting webi report add a blank column
 

2. Name the blank column title as state income tax

3. From webi report tool bar, click Variable Editor to create a variable

4. The variable will calculate the amount of state income tax based on the names listed on the [State] column
5. In Varialbe Editor, enter the formula like this:
         =IF( [State]="California";[Sales revenue]*0.05;
           IF ([State]="Colorado"; [Sales revenue]*0.1;
           IF( [State] ="New York";[Sales revenue]*0.08)))
6. Now the amount of state income tax of the three states are shown on the report.