Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse BIRT Report Developer Guide
Previous Page Home Next Page

Previous Next

Specifying alternate values for display

Data in a data source can sometimes be cryptic or appear in abbreviated form. For example, gender values may be M or F rather than male or female. Credit rankings may be 1 to 5 rather than excellent, good, average, fair, or poor.

BIRT Report Designer enables you to specify alternate values to display if you do not want to use the original values in your report. You use a data element’s map property to create rules for mapping data values. You create one map rule for each data value that you want to replace. For example, to map M and F to Male and Female, respectively, you create two map rules.

You can replace a data value with a literal text value. Alternatively, if you are creating a report that will be viewed in multiple locales, you can replace a data value with a resource key. A resource key is a text string in an external source that is translated, or localized, into different languages. Resource keys and localization are discussed in Chapter 20, “Localizing Text.”

How to map data values to different display values

1
Select the data element for which you want to replace values. The property editor displays the properties for the data element.

Figure 7‑20
1
In the first field, specify the expression that refers to the data set field for which you want to replace values. You can select, from the drop‑down list, Value of this data item. The following is an example of an expression:
"A"
Excellent
o
Specify a resource key. Choose Browse to select a resource key. You can access resource keys only if you have assigned a resource file to the report.
Figure 7‑21 shows an example of a completed map rule, which replaces the value A with the value Excellent.

Figure 7‑21
5
Choose OK. The rule that you created appears in Map List. When you select the rule, the display value appears in the box at the right, as shown in Figure 7‑22.

6
Repeat steps 3 through 5 to create additional rules, one for each data value that you want to replace. Figure 7‑23 shows an example of three map rules that were created for the selected data element.


(c) Copyright Actuate Corporation 2009

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire