Creating Physical Lookup Tables and Physical Lookup Columns

Configuring Currency Options 16-3

16.2.1 Defining User-Preferred Currency Options Using a Static Mapping

You can use a mapping to define a static list of options that all users see for selecting currency. To define the user-preferred currency options using a static mapping: 1. Use a text editor to open the userpref_currencies.xml file located in the following directory: ORACLE_ INSTANCE\config\OracleBIPresentationServicesComponent\coreapplication_ obipsn

2. Add a UserCurrencyPreferences element as follows:

UserCurrencyPreferences currencyTagMappingType=static UserCurrencyPreferences

3. For each currency option to be displayed in the Currency box or in currency

prompts, add a UserCurrencyPreference element between the UserCurrencyPreferences tags using this format: UserCurrencyPreference sessionVarValue=sessionVarValuevalue displayMessage=displayMessagevalue displayText=displayTextvalue currencyTag=currencyTagvalue In this format: ■ 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. For information, see Section 15.2.1.2, Localizing Messages for Users Preferred Currency. Then, for the value of displayMessage, specify the WebMessage name 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: Note: For the user-preferred currency options to take effect, the following configuration also must be done in the Oracle Business Intelligence repository: ■ Creation of the PREFERRED_CURRENCY session variable ■ Conversion setup of logical currency columns in the Business Model and Mapping layer ■ Creation of the userCurrencyPreference table using the currency information from your installation that enables you to dynamically change the currency options based on a logical SQL statement that you specify required only if you use a dynamic mapping For information, see Configuring Logical Columns for Multicurrency Support in Oracle Fusion Middleware Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition. 16-4 System Administrators Guide for Oracle Business Intelligence Enterprise Edition WebMessage name=kmsgMyCurrency1TEXTMy Currency 1TEXTWebMessage Then you would specify kmsgMyCurrency1 as the value of displayMessage. ■ 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. For more information about the currency.userPreference variable, see Oracle Fusion Middleware Users Guide for Oracle Business Intelligence Enterprise Edition ■ 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. The currencies.xml file, which is located in ORACLE_ HOME\bifoundation\web\display, provides currency formats. 4. Save and close the userpref_currencies.xml file. 5. Restart Oracle Business Intelligence. For information, see Section 4.1, About Starting and Stopping Oracle Business Intelligence.

16.2.2 Example: Static Mapping to Define User-Preferred Currency Options

The following example shows a userpref_currencies.xml file that uses a static mapping to define user-preferred currency options: 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 UserCurrencyPreferences Figure 16–2 shows how these values from the userpref_currencies.xml file are displayed in a drop-down list of currency options for a prompt on a dashboard page. The drop-down list is similar to what is displayed for the Currency box on the My Account dialog: Preferences tab. Note: The value of the currency.userPreference variable is obtained from the displayMessage and displayText attributes of the UserCurrencyPreference element using the following order of precedence: 1. displayText 2. displayMessage If no values exist for displayText and displayMessage, then the value of the displayMessage attribute for the corresponding currency tag in the currencies.xml file is used. Configuring Currency Options 16-5 Figure 16–2 Static Currency Options in a Prompt

16.2.3 Defining User-Preferred Currency Options Using a Dynamic Mapping

You can use a mapping to define a dynamic list of options that users see for selecting currency. The list changes dynamically based on a logical SQL statement that you specify. This is useful, for example, to dynamically change the currency options based on the user. To define user-preferred currency options using a dynamic mapping: 1. Use a text editor to open the userpref_currencies.xml file that is located in the following directory: ORACLE_ INSTANCE\config\OracleBIPresentationServicesComponent\coreapplication_ obipsn 2. Add a UserCurrencyPreferences element as follows: UserCurrencyPreferences currencyTagMappingType=dynamic UserCurrencyPreferences 3. Add a UserPrefCurrencyLogicalSQL element between the UserCurrencyPreferences tags using this format: UserPrefCurrencyLogicalSQL SELECT column1, column2, column3 FROM userCurrencyPreference UserPrefCurrencyLogicalSQL In this format: ■ column1 contains the values that are used to set the session variable PREFERRED_CURRENCY. Each value in this column is a string that uniquely identifies the currency, for example, gc1. ■ column2 contains the currency tags in the currencies.xml file whose displayMessage values are to be used to populate the Currency box and currency prompts, for example, int:euro-1. The currencies.xml file, which is located in ORACLE_HOME\bifoundation\web\display, provides currency formats. ■ optional column3 contains the values used to set the presentation variable currency.userPreference. Each value in this column is a string that identifies the currency, such as Global Currency 2. Note: If you omit column3, then the values for the displayMessage attributes for the corresponding currency tags in the currencies.xml file are used.