You are on page 1of 10

Hierarchies in Webi

The task is to display a fixed level hierarchy together with totals for each level. This can be done using breaks. The most straightforward implementation might look like this:

If there are many levels and the level names are long, the table will be very wide, with a lot of empty space. It would be better to have more compact layout, for example:

This post describes how to implement such layout.

Steps

Lets prepare a test query from the Island Resorts Marketing universe:

The initial layout of the table:

Apply breaks on Country, Resort and Service Line. Add totals.

Show break headers for all breaks:

Clear the break headers. Then copy the expression from the table body to the header (for the break columns) as below:

Merge header and footer cells:

Hide the text for the body cells by setting its color to white. You should not clear the content of the cells because these columns are used for the breaks.

Make a nice and compact layout:

Adjust colors and borders:

I learned this technique from my brilliant colleague Maria Ruchko :)

Use of Alerts in Webi


This post is a quick guide how to add a simple alert to a table in Webi.

Images
Upload necessary images to the BO server in the folder [Business Objects]\BusinessObjects Enterprise 12.0\images In this example images green_arrow.gif and red_arrow.gif were used.

Preparation
Create new Webi document based on Island Resort Marketing universe, Pull object Resort, Year, Revenue into the query. Create the variable Revenue 2004 with the following expression: =Sum(If [Year]=FY2004 Then [Revenue]) and Revenue 2005 =Sum(If [Year]=FY2005 Then [Revenue])

Defining Alert
Click the alerter button on the tool bar.

Create new alerter, and in the created alerter add two sub-alerters: one for green arrow when Revenue for 2004 is less then Revenue for 2oo5, and one for red arrow in the opposite situation.

For the first sub-alerter, select Image from URL, and enter boimg://greet_arrow.gif in the URL field. Boimg refers to the folder [Business Objects]\BusinessObjects Enterprise 12.0\images. Do the same for the second sub-alerter.

Apply the created alerter for the column Revenue 2005.

This will add the arrows to the cells:

Another use of Alerts


Another use of alerts is to replace blank (on the left side) values with NA (on the right side):

Dynamic Formatting in Web Intelligence


Posted in Web Intelligence - 18 August 2011 - No comment You can get the response string to a prompt using Web Intelligence function UserReponse(). However the function returns string value which is formatted according to Web Intelligence preferred locale. To make handling of date strings independent on the locale, dynamic formats can be used.

Dynamic Formats in ToDate Function


To convert the date prompt string into date, ToDate function can be used. date ToDate(date_string;format) If locale is French (Canada), the format should be yyyy-MM-dd HH:mm:ss. For example, = ToDate(UserResponse("Date:");"yyyy-MM-dd HH:mm:ss") To make a report independent on the format (and correspondingly the locale), the dynamic formats can be used. The dynamic input formats are INPUT_DATE_TIME, INPUT_DATE.

So: = ToDate(UserResponse("Date:");"INPUT_DATE_TIME")

Handling Date and DateTime Format


Before SP2 of BOE XI 3.1, the user could enter date in both date and datetime format, and conversion using specific format would not work correctly in all situations. The formula that accounts the both possible formats: =If(IsError(ToDate(UserResponse("Date:");"INPUT_DATE")); ToDate(UserResponse("Date:");"INPUT_DATE_TIME"); ToDate(UserResponse("Date:");"INPUT_DATE"))

Dynamic Formats with FormatDate


The dynamic formats can be used in FormatDate() function. =FormatDate(CurrentDate();"LONG_DATE") BusinessObjects documentation does not list the available dynamic formats. Some of them can be found in dialog Number Format.

You might also like