Applying PeopleSoft Regional Settings Personalizations to BI Publisher Reports

This topic discusses how to:

  • Applying PeopleSoft regional settings personalizations to online reports in PIA.

  • Personalize reports run through process scheduler.

When displaying date, date-time, time or number values in a report, you may format these values according to the PeopleSoft Regional Settings formatting options.

Parameters

To apply PeopleSoft regional settings personalizations to BI Publisher reports, PeopleSoft provides the following parameters to the BI Publisher core engine at runtime:

  • $PsftDateTime

  • $PsftDateTimeTZ

  • $PsftDate

  • $PsftTime

These parameters contain the PeopleSoft specific formatting mask for PeopleSoft date-time, date, and time fields. You may declare and use these parameters in the template in conjunction with the format-date() function. For example:

  • <?format-date:QEQ_HIST_DT;$PsftDate?>

  • <?format-date:DTTM_STAMP;$PsftDateTime?>

  • <?format-date:DTTM_STAMP;$PsftDateTimeTZ?>

Prior to using these parameters, you must declared them under a form field at the top of the reports primary template, one for each of the parameters being used as shown in the following example:

<xsl:param name="PsftDate" xdofo:ctx="begin"/>
<xsl:param name="PsftDateTime" xdofo:ctx="begin"/>
<xsl:param name="PsftDateTimeTZ" xdofo:ctx="begin"/>
<xsl:param name="PsftTime" xdofo:ctx="begin"/>

Time Value Formats

To format time values, you must prefix an arbitrary date value to the time before you can successfully format it. This is necessary to ensure that the date-time value passed to the format-date() function is in the required canonical format. The following example shows prefixing a date component to the runtime value and formatting it using the $PsftTime parameter:

<?if:RUNTIME!=' ' and RUNTIME!=''?>
<?format-date:concat('1900-01-01T',RUNTIME);$PsftTime?>
<?end if?>

Number Value Formats

Formatting a number value does not require the use of a parameter. It only requires that an Oracle number format mask, including the grouping separator (G) and decimal separator (D), be specified in the format-number() function, as shown in the following example:

<?format-number:AMOUNT;'999G999D99'?> 

See Report Designers Guide for Oracle Business Intelligence Publisher, “Formatting Numbers” for more information.

Formatting Masks

The following are the PeopleSoft regional settings formatting options taken into consideration for the PeopleSoft formatting masks:

  • Time Separator

  • Date Separator

  • Local Time Zone

  • Date Format

  • Digit Group Separator

  • Decimal Separator

  • Time Format

Dependencies

Note the following dependencies for applying PeopleSoft regional settings personalizations to BI Publisher reports:

  • The report template type must be RTF or XSL.

  • The format-date() function requires a date-time value in the canonical format. For example:

    Date:  2008-07-28
    Date-Time:  2008-07-28T09:00:00-0700 
    Time:  1900-01-01T05:55:00
    

    Data from the T onwards is optional. If not included, BI Publisher assumes it represents 12:00 AM UTC.

    For example:

    2008-07-28T00:00:00-0000

This section discusses:

  • Applying regional settings personalizations to online reports in PIA.

  • Using the session language code to determine number formatting.

  • An example of applying PeopleSoft regional settings personalizations to BI Publisher reports using the en-us locale

  • An example of applying PeopleSoft regional settings personalizations to BI Publisher reports using the fr locale.

Applying PeopleSoft Regional Settings Personalizations to Online Reports in PIA

When a BI Publisher report is run online using the PeopleCode APIs, or via the Query Report Viewer PIA page, the personalization settings are determined based on the following three levels:

  • User-specific.

  • Locale-specific.

  • System-wide.

The user-specific settings are those that are specified by overriding any of the default values displayed under your My Preferences - Regional Settings page, and have the highest level of precedence.

If no overrides have been defined for a user, the personalization settings are driven by the locale that is set in the browser, assuming that personalization options have been configured for this specific locale in the PeopleSoft system. See Defining Locale-Specific Formatting for more information.

If no locale-specific personalization settings have been defined for the particular locale in use, the system-wide defaults will then be applied. The system-wide defaults are the default values displayed under your My Preferences – Regional Settings page prior to specifying any overrides.

Using the Session Language Code to Determine Number Formatting

The PeopleTools Settings property group features a psxp_number_format_src property that lets you modify the behavior regarding the personalization of number values. It effectively allows you to revert to the method used in PeopleTools 8.55 and earlier releases. In PeopleTools 8.55 and earlier releases, you can use the language code of the current user session to determine the decimal and digit group separators used when formatting a number with the format-number() function.

Note that this property does not have any effect on reports run through the process scheduler, as number formatting in a scheduled report will always be driven by the language code of the process run control. For more information see section Personalizing Reports Run Through Process Scheduler later in this topic for more information.

By default, the psxp_number_format_src property is set to Browser, and the formatting of number values is based on the PeopleSoft Regional Settings. You can set the property to LangCode to put into effect the older behavior.

The property is located in the PeopleTools Property Group on the Global Properties page or on the Report Definition page - Properties page. See Setting Up BI Publisher for more information.

You can also set the property using the ReportDefn class method, SetRuntimeProperties, in the PeopleCode API. See SetRuntimeProperties

Example: Applying PeopleSoft Regional Settings Personalizations Using the en-us Locale

The following examples illustrate reports with PeopleSoft formatted date-time, number, date and time values, when run in a browser using the en-us locale

Note that the examples in this section reflect the regional settings as delivered for the en-us locale, for example: the date format is MMDDYY, the time format uses the 12 hour clock with AM/PM designator, the number has a comma for the digit group separator, and a decimal for the decimal separator.

Image: BI Publisher Report QEQ_LOCALEQUERY with PeopleSoft Regional Settings (en-us Locale)

The following example illustrates BI Publisher Report, QEQ_LOCALEQUERY, formatted with PeopleSoft regional settings using the en-us locale.

BI Publisher locale query report formatted with regional settings using the en-us locale.

Image: BI Publisher Report QE_QRY_PRCS_TIME with PeopleSoft Regional Settings (en-us Locale)

The following example illustrates BI Publisher Report, QE_QRY_PRCS_TIME, formatted with PeopleSoft regional settings using the en-us locale.

BI Publisher query processing time report formatted with regional setting using the en-us locale.

Example: Applying PeopleSoft Regional Settings Personalizations Using the fr Locale

The following examples illustrate Reports with PeopleSoft-formatted date-time, number, date and time values, when run in a browser using the fr locale

Note that the examples in this section reflect the regional settings as delivered, for the fr locale, for example: the date format is DDMMYY, the time format uses the 24 hour clock, and the number has a space for the digit group separator, and a comma for the decimal separator.

Image: BI Publisher Report QEQ_LOCALEQUERY with PeopleSoft Regional Settings (fr Locale)

The following example illustrates BI Publisher Report, QEQ_LOCALEQUERY, formatted with PeopleSoft regional settings using the fr locale.

BI Publisher locale query report formatted with regional settings using the fr locale.

Image: BI Publisher Report QE_QRY_PRCS_TIME with PeopleSoft Regional Settings (en-us Locale)

The following example illustrates BI Publisher Report, QE_QRY_PRCS_TIME, formatted with PeopleSoft regional settings using the fr locale.

BI Publisher query processing time report formatted with regional settings using the fr locale.

When reports are run through the Process Scheduler, there is no browser locale to consider, and personalization depends only on the user-specified overrides or system defaults from the My Preferences - Regional Settings page. This is determined specifically for the user who scheduled the report.

Note however that for a scheduled report, the regional settings only apply to the date, date-time and time values. For the purpose of maintaining backwards compatibility, a number value in a scheduled report will always be determined by the language code that is associated with the process run control. This is meant to avoid impacting already-existing behavior regarding the formatting of number values in a scheduled report. Essentially, the language code is used to obtain the associated ISO locale code from the PSLANGUAGES table (for example, ENG=en, FRA=fr, etc.), which is then used by the BIP engine while processing the report. This determines the appropriate locale-specific grouping separator (G) and decimal separator (D) to be used when a number is formatted with the format-number() function.

For example, when running with language code FRA, the outcome of this form-field syntax:

<?format-number:AMOUNT;'999G999D99'?>

where AMOUNT = 1234.56 will be 1 234,56.