Working with Multiple Languages

This chapter provides an overview of how to work with multiple languages.

Click to jump to parent topicUnderstanding How to Work with Multiple Languages

This section discusses:

Click to jump to top of pageClick to jump to parent topicData Returned by the Report

Data that is returned by Crystal Reports 2008 is fetched from the database using PeopleSoft Query; data that is returned by BusinessObjects Enterprise XI is fetched from the database using Query Access Services (QAS). Therefore, the data is already language-sensitive due to the automatic joining to related language tables that PeopleSoft Query performs. No special logic is required to ensure that appropriate descriptions from related language tables are returned in Crystal Reports output.

See Getting Started with PeopleSoft Query.

See The Enterprise PeopleTools 8.51 Installation Guide for your database platform: “Installing and Configuring Software for Crystal Reports,” Install BusinessObjects Enterprise XI, Understanding QAS.

Click to jump to top of pageClick to jump to parent topicReport Layout and Boilerplate Text

The Crystal Reports .rpt file contains the layout of the report and any text that is hard-coded into the layout, such as column headings, headers, and footers. Because Crystal Reports does not provide any ability to maintain multiple translations of this boilerplate text in a single .rpt file, you must maintain a separate copy of the report layout for each language.

For use with the Crystal Reports 2008 runtime environment, PeopleSoft PeopleTools maintains separate directories on the file and report servers within the <PS_HOME>\CRW directory that correspond to the language codes that are available for your PeopleSoft implementation. Each directory contains the appropriate report in the specified language if the report has been translated. PeopleSoft PeopleTools reads the report from the directory that corresponds to the user’s preferred language. If it cannot find the report there, Crystal Reports 2008 uses the report in the base language directory <PS_HOME>\CRW. Finally, if the report is not in the directory corresponding to the user’s current language or in the base directory, PeopleSoft PeopleTools uses the copy of the report in the <PS_HOME>\CRW\ENG directory.

For use with the BusinessObjects XI runtime environment, PeopleSoft PeopleTools maintains separate language subdirectories in the BusinessObjects Enterprise report repository.

Click to jump to top of pageClick to jump to parent topicCrystal Reports Designer/Runtime Language Versions

Crystal Reports supports several different languages. You choose the preferred language during the install of the Crystal Reports 2008 application. Each language version of Crystal Reports is functionally identical; the primary difference is the language of the Crystal Reports Designer user interface. You do not need to match the language of the Crystal Reports design or runtime engine to the language of the report that you are creating unless you are using the Crystal ToWords function. You can overcome this limitation by using the PSToWords or PSToWordsLoc functions.

Using PSToWords and PSToWordsLoc

PSToWords and PSToWordsLoc are similar to the Crystal ToWords function in that they convert a numerical amount into a textual representation of that amount, as you see on checks. But unlike ToWords, these functions are independent of the installed language of Crystal Reports Designer. After you configure the location of the supporting .dlls, these functions appear in the Crystal Function Editor as new Additional Functions.

Configuring Crystal Reports Designer to Use PSToWords

PSToWords and PSToWordsLoc functionality is contained in three files called icudt34.dll, psicuin34.dll, and psicuuc34.dll. These files are located in your <PS_HOME>\bin\client\winx86 directory. Unlike in prior releases, in PeopleTools 8.51 and higher, you do not need to manually copy these files to your local directory where crw32.exe is installed (for example, C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86). These files are automatically copied for you when you install the PeopleSoft ODBC and Crystal Runtimes.

See the Enterprise PeopleTools 8.51 Installation Guide for your database platform: “Installing the PeopleSoft ODBC Driver and Crystal Runtime”

Similarly, for Crystal Reports XI, you don't have to copy the files because the installation program automatically does this for you. For Process Scheduler to use these functions in a scheduled report, you do not need to configure anything because <PS_HOME>\bin\client\winx86 is the current directory for the Process Scheduler.

You can enter PSToWords or PSToWordsLoc directly in the Function Editor, or you can select these functions from the list of additional functions in the Function Editor of the Crystal Reports 2008 Designer. To confirm that the .dlls are loaded in Crystal Designer, select Help, About, More Info, and check that the three psicu files are listed.

Syntax for PSToWords and PSToWordsLoc

The syntax for PSToWords is PSToWords(number,places), where number is a numeric amount and places is the number of decimal places or precision to print. For instance, PSToWords(12.345,2) prints twelve and 35 / 100.

The syntax for PSToWordsLoc is PSToWordsLoc(locale,number,places), where the locale parameter specifies an International Organization for Standardization (ISO) language or locale code. For instance, PSToWordsLoc("es",12.345,2) prints doce y 35 / 100. For examples of ISO locales that are used in PeopleSoft Enterprise products, see the following cross-references.

See Determining PeopleSoft and ISO Codes for Your Language, Using Browser Language Settings to Determine the Sign-in Language.

Converting Entities to Characters

Crystal Reports is Unicode-enabled, except in Application Protocol Interface (API) function calls. To work around this limitation, PSToWords and PSToWordsLoc return any non-USASCII characters as HTML decimal entities. To convert these entities to Unicode characters, you need to include a report custom function in your .rpt file. In Crystal Reports Designer Formula Workshop, create a new Report Custom Function called PSToUChar and paste in the following code:

Function (StringVar instring) local StringVar outstring := ""; local NumberVar i; local StringVar curtoken; local NumberVar toklen; local StringVar widechar; //Convert Entities to ChrW for i := 1 to (Length(instring)) Do ( curtoken := mid(instring,i,2); toklen := instr(i+2,instring,";")-(i+2); if curtoken = "&#" then widechar := chrw(val(mid(instring,i+2,toklen))); if curtoken = "&#" then outstring := outstring + widechar; if curtoken = "&#" then i:=i+toklen+2; if curtoken <> "&#" then outstring := outstring + mid(instring,i,1); ); outstring;

A report-defined function enables you to define a function to be saved within the .rpt file. The syntax for this function is

PSToUChar(PSToWords(number,places))

or

PSToUChar(PSToWordsLoc(locale,number,places))

Limitations

The largest number converted to words is 999,999,999.999 for most languages. Numbers higher than that amount, or where the encoded string of words would exceed 254 bytes, appear as digits rather than as words.

Because Thai words for numbers often exceed the 254-byte limit when encoded as entities, you can use the special locale x-th instead of th to return the Thai characters without encoding them as entities. Using the special locale allows a longer string to be processed, but requires a server with a system default locale set to Thai. The syntax for Thai processed in this way is: ToWordsLoc("x-th",number,places).

Click to jump to top of pageClick to jump to parent topicLanguage Parameter for pscrrun.exe

PeopleSoft Process Scheduler uses the pscrrun.exe process to run Crystal Reports 2008. The process’s language code parameter specifies the language directory that pscrrun.exe uses to fully qualify the report path. Unlike Structured Query Reports (SQRs), pscrrun.exe searches for a separate Crystal Reports file for each translation of the report. The language directory parameters are needed because each language-specific report is stored in a separate language directory. If the report is not found in the language that is specified by the parameter, pscrrun.exe looks in the default, base-language directory.

Typically, the language parameter is passed to pscrrun.exe from the run control that is associated with your Crystal report.

Note. The executable program for Crystal Reports 2008 is PSCRRUN.EXE. The executable program for BusinessObjects Enterprise XI is PSBOERUN.EXE. The command line executable changes when you convert your reports to the Crystal XI format.

See The Enterprise PeopleTools 8.51 Installation Guide for your database platform: “Installing and Configuring Software for Crystal Reports,” Converting Crystal Reports, Converting Reports from Crystal Reports 2008 format to Crystal Reports XI format.

See Also

Enterprise PeopleTools 8.51 PeopleBook: PeopleSoft Process Scheduler

Click to jump to top of pageClick to jump to parent topicConfiguration of Crystal Reports for Multilingual Environments

The PeopleSoft system allows you to use a single Crystal Reports server for all languages. The following features support this functionality:

See Crystal Reports Designer/Runtime Language Versions.

Click to jump to top of pageClick to jump to parent topicTranslated Report Searches

To call up translated production reports in the correct language, the Crystal Reports for PeopleSoft application performs the following steps in this order:

  1. The -RP parameter specifies a path and report name, including the .rpt extension.

    If the report exists, the Crystal Reports for PeopleSoft application selects the report. If the report does not exist, the search for the report fails.

  2. The -RP parameter specifies a path but does not specify the full report name, including the .rpt extension.

    Crystal Reports looks for translated reports based on the path in the -RP parameter as follows. If the report is not found in any of these directories, the search fails:

    1. The Crystal Reports for PeopleSoft application appends the language code, as defined by the -LG parameter of the command line, to the path that is set in the -RP parameter and searches for the report.

    2. If the report does not exist, the application appends the language code that uses the preferred language as specified on the user’s machine to the path that is set in the -RP parameter and searches for the report.

    3. If the report still does not exist, the application appends the language code that uses the base language as defined for the PeopleSoft system to the path that is set in the -RP parameter and searches for the report.

    4. If the report still does not exist, the application searches for the report using the path that is set in the -RP parameter.

  3. The -RP parameter is not specified.

    Crystal Reports 2008 looks for translated reports based on the CRWRPTPATH environment variable as follows. If the report is not found in any of these directories, the search fails:

    1. The Crystal Reports for PeopleSoft application appends the language code, as defined by the -LG parameter of the command line, to the path that is set in the directory that is specified by the CRWRPTPATH environment variable and searches for the report.

    2. If the report does not exist, the application appends the language code that is the preferred language as specified on the user’s machine to the path that is set in the directory specified by CRWRPTPATH and searches for the report.

    3. If the report still does not exist, the application appends the language code that is the base language as defined for the PeopleSoft system to the path that is set in the directory that is specified by CRWRPTPATH and searches for the report.

    4. If the report still does not exist, the application searches for the report using the path that is set in the directory that is specified by CRWRPTPATH.

BusinessObjects Enterprise XI searches for translated reports in the BusinessObjects Enterprise report repository in the same way.

See Defining PeopleSoft Process Scheduler Support Information, Specifying the Path for Production of Crystal Reports.