Progress
Report Builder
User’s Guide
Code Pages
Report Builder and Report Engine, when executing in memory, always use the code page specified by the Internal Code Page (-cpinternal) parameter to manipulate character data. In addition, when Report Builder and Report Engine display characters to the monitor, they also use the -cpinternal code page to display character data. The default code page for cpinternal is ISO8859-1.
There are many operating system files that Report Builder and Report Engine read from or write to. Some of these files might use a code page other than -cpinternal. For these files, Report Builder and Report Engine try to convert between -cpinternal and whatever code page the file uses. The conversion uses tables in the
convmap.cp
file.Files
The files that Report Builder and Report Engine read from (and write to) are:
- Report Library
The report library keeps track of which code page is used in each report. Note that each report can use a different code page. This code page applies to the characters used in the report’s definition, such as the report’s name, text fields, character constants in calculated field expressions, and filters. This code page does not apply to the database data that is used to construct the report (the database data is treated separately, as described below).
In general, when Report Builder and Report Engine read a report, they convert the text in the report’s definition from the code page in which it was stored into the -cpinternal code page. Also, when you save the report to disk (for example, using Report
Save), Report Builder generally stores the text in the report’s definition using the -cpinternal code page. However, you can override both these general rules (see the description of the Report Code Page In (-rbcpreportin) and Report Code Page Out (-rbcpreportout) parameters in the "Report Builder Startup Parameters" section).
Note that when Report Builder and Report Engine read in a report, they rely on the
convmap.cp
file to help them convert from the report’s code page to the code page specified by -cpinternal. If theconvmap.cp
file does not contain a conversion table between the report’s code page and the -cpinternal code page, Report Builder and Report Engine simply treat the report as though its code page is undefined.- Database Files
The character data in a database is generally stored in the same code page, and the database knows which code page that is. When Report Builder and Report Engine read data from a database, they automatically convert the data from the database’s code page to the -cpinternal code page, using the conversion tables in
convmap.cp
. This applies to data that is included in a report, such as customer records, and also applies to Report Engine table records, for example, records that contain report parameters.- Memo Files
By default, Report Builder and Report Engine assume that memo files use the code page specified by the Stream Code Page (-cpstream) parameter. However, you can override that by putting a CODEPAGE line at the top of the memo file — in this case, the memo file tells Report Builder and Report Engine which code page it is in. In either case, Report Builder and Report Engine convert the memos in the file from this code page to the -cpinternal code page, using the conversions specified in
convmap.cp
.- User-defined Function File
The UDF file keeps track of which code page is used in each UDF. Each UDF can use a different code page. The code page applies to the UDF’s name and to the character string constants (if any) used in the UDF’s expression. In general, when Report Builder and Report Engine read in a UDF, they convert it from the code page in which it was stored into the -cpinternal code page. Whenever you edit an existing UDF (and click OK in the edit dialog), Report Builder writes the UDF out to disk, and it generally writes the UDF out in the same code page in which it was originally stored in the UDF file. Whenever you create a new UDF (and click OK in the New User Defined Function dialog box), Report Builder generally writes the UDF out in the -cpinternal code page.
However, you can override these general rules (see the "Startup Parameters" section).
- Export File
When Report Builder and Report Engine generate export files, they generate them in the -cpstream code page. If -cpstream is different from the -cpinternal code page, then Report Builder and Report Engine convert characters from the -cpinternal code page to the -cpstream code page, using the conversion table in
convmap.cp
.- Print File
When Report Builder and Report Engine print a report to a file, they do not convert any characters (although the printer driver might).
- PROMSGS
When Report Builder and Report Engine display error messages from PROMSGS, they will convert the messages to the -cpinternal code page before displaying them.
Parameters
The "Startup Parameters" section describes the startup parameters you can use with Report Builder and Report Engine. This section provides some examples of how to use some of the parameters:
- Report Code Page In (-rbcpreportin) Parameter
To direct Report Builder and Report Engine to do no conversion when reading in reports, use the following parameter:
If the -rbcpreportin parameter specifies a code page that is not “undefined”, and -cpinternal is not “undefined”, and the -rbcpreportin code page is different from -cpinternal code page, then Report Builder and Report Engine will look in the
convmap.cp
file for the conversion from the -rbcpreportin code page to -cpinternal. They then apply this conversion to the text strings in the report’s definition when they read in the report.- Report Code Page Out (-rbcpreportout) Parameter
If the specified code page is not “undefined” and is not the same as the -cpinternal code page, and if -cpinternal itself is not “undefined”, then when Report Builder saves a report, it converts the saved report to the specified code page, using the conversion tables in
convmap.cp
. This has no effect on the report in memory (which is always in the -cpinternal code page); it affects only the copy of the report being stored into the report library.- UDF Code Page In (-rbcpudfin) Parameter
To direct Report Builder and Report Engine to do no conversion of user-defined functions when reading them from the UDF file, use the following parameter:
If the -rbcpudfin parameter specifies a code page that is not “undefined” and is not the same as -cpinternal, and if -cpinternal itself is not “undefined”, then Report Builder and Report Engine will look in the
convmap.cp
file for the conversion from the specified code page to the -cpinternal code page. They then apply this conversion to the text string constants (if any) in each UDF that they read in while processing reports. Note that the -rbcpudfin parameter by itself has no effect on the code page used to save existing UDF’s back to disk when you edit them. That is, if you specify - rbcpudfin but not -rbcpudfout, and if you edit an existing UDF, Report Builder saves it back to disk using the code page in which the UDF was stored in the UDF file, not in the code page specified by -rbcpudfin.- UDF Code Page Out (-rbcpudfout) parameter
If the code page is not “undefined” and is not the same as -cpinternal, and if -cpinternal itself is not “undefined”, then Report Builder will use the conversion table in
convmap.cp
to convert the UDF as it saves the UDF to disk. This has no effect on the UDF in memory (which is always in -cpinternal code page); it affects only the copy of the UDF being stored into the UDF file.Do not specify different values for the corresponding input/output pairs in the same session. For example, do not specify ISO8859-1 for -rbcpreportin and ibm850 for -rbcpreportout.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |