Wednesday, October 3, 2012

Currency settings in OBIEE part 2

You may be interested in the part 1 post as well.

Configuring user preferred currency options by static mapping.

Login to Answers and in the top right hand corner of the webpage  select the user(e.g. weblogic) –> MyAccount

image

image

notice that the currency option is not yet available.

go to $ORACLE_INSTANCE\config\OracleBIPresentationServicesComponent\coreapplication_obips1 and edit the file userpref_currencies.xml to look like as shown.

<Config>

<UserCurrencyPreferences currencyTagMappingType="static">
  <UserCurrencyPreference sessionVarValue="gc1" displayText="Global Currency 1" currencyTag="int:USD" />
  <UserCurrencyPreference sessionVarValue="gc2" displayText="Global Currency 2" currencyTag="int:euro-l" />
  <UserCurrencyPreference sessionVarValue="gc3" displayText="Global Currency 3" currencyTag="loc:ja-JP" />
  <UserCurrencyPreference sessionVarValue="orgc" displayText="Org Currency" currencyTag="loc:en-BZ" />
  <UserCurrencyPreference sessionVarValue="lc1" displayTag="int:DEM" currencyTag="int:DEM" />
</UserCurrencyPreferences>

</Config>

to quote from the OBIEE Administrator’s guide:

For each currency option to be displayed in the Currencybox or in currency
prompts, add a UserCurrencyPreference element between the

<UserCurrencyPreferences> tags using this format:
<UserCurrencyPreference sessionVarValue="sessionVarValuevalue"
displayMessage="displayMessagevalue" displayText="displayTextvalue"
currencyTag="currencyTagvalue"/>
  • sessionVarValue="sessionVarValue" sets the session variable PREFERRED_
    CURRENCY. For its value, specify a string that uniquely identifies the
    currency, for example, gc1.
  • (optional) displayMessage="displayMessagevalue" sets the presentation variable currency.userPreference to a localized value. To specify a localized value, you first must create the localized message for the currency in the usercurrencymessages.xml file. "Then, for the value of displayMessage, specify the WebMessagename that is identified in the usercurrencymessages.xml file for the currency. For example, if you created this English language entry in the usercurrencymessages.xml file:

    <WebMessage name="kmsgMyCurrency1"><TEXT>My Currency 1</TEXT></WebMessage>

  • (optional) displayText="displayTextvalue" sets the presentation variable currency.userPreference to a value that is not localized. For its value, specify a string that identifies the currency, such as Global Currency 2.
  • currencyTag="currencyTagvalue" identifies the Currency Tag in the
    currencies.xml file whose displayMessage value is to be used to populate the
    Currency box on the My Account dialog: Preferences tab and currency
    prompts.

save userpref_currencies.xml  file and restart OBIEE services. now in the preferences tab, the currency list you configured should be displayed.

image

Monday, October 1, 2012

Currency settings in OBIEE part 1

To set the default system currency

Note: It is a good idea to backup your configuration files before you make any changes.

  • open currencies.xml located in ORACLE_BIHOME\bifoundation\web\display. e.g. on my machine, this is located in D:\OBIEE11g\Oracle_BI1\bifoundation\web\display\currencies.xml
  • In currencies.xml file you will find a list of currencies defined by enclosing them in the <Currency> </Currency> tag. Locate the currency you want to make as the system default. e.g. we want to make Pound as the default currency

<Currency tag="loc:en-GB" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
      <negative tag="minus" format="-$#" />
   </Currency>

  • cut and paste this line just below the <Currencies> tag.
  • next, search for the Currency tag which has the text tag="int:wrhs". locate this tag and comment it.
  • replace the tag value in the pound currency from tag="loc:en-GB" to tag="int:wrhs". Your currency tag for pound should look like this

<Currency tag="int:wrhs" type="local" symbol="£" locale="en-GB" format="$#" digits="2">
<negative tag="minus" format="-$#" />
</Currency>

  • Restart OBIEE presentation services.

Reference: OBIEE 11g System Administrator's Guide

Setting preferred currency option for an Analysis column in OBIEE Answers

create an Analysis in OBIEE answers involving the usage of a measure to be displayed as currency.

image

select F1 Revenu –> Column properties

image

image