Friday, January 4, 2013

Variable Prompt Value within Report title in OBIEE 11g



Working With Variables.
Example of Referencing a Variable in a Title View

Quick Reference on Variables
Variable Call Syntax




Variables within Expressions

Using a Session Variable within an Expression
"Market"."Region"=VALUEOF(NQ_SESSION."SalesRegion")

Using a Presentation Variable within an Expression
"Market"."Region"=@{MyFavoriteRegion}{EASTERNREGION}

Date Variables

Working With Date Variables here is an example of a date being loaded into a variable from a
dashboard prompt.

FILTER in report is an Advanced SQL Filter

Its a Filter with a report that takes the date being passed in from the Dashboard prompt and giving all results
from 3 months prior.

"Dim - Calendar".Date BETWEEN TIMESTAMPADD(SQL_TSI_MONTH,-3,date '@{currentdate}') AND date '@{currentdate}'

“date” is being used to tell analysis the prompt being passed in is a date.
“currentdate” is my variable name being loaded from dashboard prompt

To load a dashboard prompt , Create dashboard prompt and set a variable within it as below.



Example of Referencing a Variable in a Title View

Suppose that you have created a dashboard prompt called Region, which is based on the Region column and which creates a presentation variable called MyFavoriteRegion as shown below





variable set MyFavouriteRegion

You can reference the MyFavoriteRegion variable in the Title view so that the user's
selection in the Region prompt is displayed in the title of the analysis. To do so, you
enter the variable syntax @{variables.MyFavoriteRegion}





SAVE ALL
Thats it you will see Prompt Value within Report title