
Chapter 5 Using the Report Language Editor
Translating a keyword in an object property value
To translate a keyword in an object property value, you must open a report language resource file and define mappings in a mapping table.
Mapping tables are made up of:
- A Name column, which contains the name of keywords in object property values
- A Value column, which contains the value assigned to the keyword
The translations you perform in the report language resource file are visible in the generated report.
The Values Mapping category allows you to define translations for keywords in object property values for:
- All modules using the default Standard mapping tables in Forms and Lists categories. You can customize these tables
- Each module individually by creating a mapping table and assign it to a particular module
Standard mapping table customization
You can customize the predefined Standard mapping table, which contains keywords that apply to all modules:
- Click the Standard entry in the Forms or Lists category to display its corresponding mapping table in the right pane of the report language property sheet.
- Click the line that corresponds to the keyword value you want to translate in the Value column.
- Type a translation and click Apply.
- The following example shows the translation of the <None> keyword:
Mapping table creation
In addition of using the Standard mapping table, you can create your own mapping table that you can associate to a particular module afterwards. To do so, you have to do the following:
- Create a new mapping table from the root of the Forms or Lists category using the New→Map Item command from their respective contextual menu
- Type keyword names and their corresponding values in the mapping table
The following example shows a new mapping table DisplayMap created from the Lists category. You cannot use it until you assign it to a particular module:
Mapping table assignment
Once you have created a new mapping table, you can assign it to a particular module.
To do so, you have to recreate the Object Attributes tree view in the Forms or in the Lists category.
For example if you want to assign a mapping table for columns in a PDM, you have to do the following:
- Create a new category from the Forms or Lists category contextual menu using the Add→New category command and name it Physical Data Model
- Create a new entry from the Physical Data Model category contextual menu using the Add→Map Item command and name it Column
- Assign an existing mapping table to each property of the Column
object for which you want to translate keywords
The following example shows a mapping table in which each column object property uses a different mapping table:
To translate a keyword in an object property value:
- Open the Report Language Editor.
- Click the Values Mapping category in the Language tree view to display its tree view.
- Click the Lists or the Forms category to display its tree view.
- Click a module category to display its tree view
- Drill down to the object for which you want to display the mapping table to translate.
The corresponding mapping table is displayed to the right of the tree view.
- Click a blank line in the Name column.
- Type a keyword value to translate.
- Click the corresponding line in the Value column and type the mapping table name you want to use for the translation of the keyword value that will display in the generated report.
- Click OK.
Each time a mapping applies, the exact content of the keyword in the Name column is evaluated (disregarding the case) and replaced with its corresponding translation, which is defined in the mapping table that is displayed in the Value column.
Example of a translation with a mapping table assigned to a particular module
You define the MandMap mapping table in the Report Language Editor that will be used by another mapping table that you define afterwards:
You define the Column mapping table that uses the MandMap mapping table you have previously defined:
How it is displayed in the generated report:
Copyright (C) 2007. Sybase Inc. All rights reserved.
|
|