Designing reports using BIRT Studio : Editing and formatting report content : Applying a string format : Defining a custom string format
 
Defining a custom string format
You can define a custom string format using special symbols to construct a format pattern. Table 2‑6 describes these symbols.
Table 2‑6 Symbols for defining custom string formats
Symbol
Description
@
Character placeholder. Each @ character displays a character in the string. If the string has fewer characters than the number of @ symbols that appear in the format pattern, spaces appear. Placeholders are filled from right to left, unless you specify an exclamation point (!) at the beginning of the format pattern.
&
Same as @, except if the string has fewer characters, spaces do not appear.
!
Specifies that placeholders are to be filled from left to right.
>
Converts string characters to uppercase.
<
Converts string characters to lowercase.
Table 2‑7 shows example results of custom string format patterns on string data.
Table 2‑7 Examples of custom string formats
Format pattern
Data in original format
Results of formatting
(@@@) @@@‑@@@@
6175551007
5551007
(617) 555‑1007
(   ) 555‑1007
(&&&) &&&‑&&&&
6175551007
5551007
(617) 555‑1007
() 555‑1007
!(@@@) @@@‑@@@@
6175551007
5551007
(617) 555‑1007
(555) 100‑7
!(&&&) &&&‑&&&&
6175551007
5551007
(617) 555‑1007
(555) 100‑7
!(@@@) @@@‑@@@@ + ext 9
5551007
(555) 100‑7    + ext 9
!(&&&) &&&‑&&&& + ext 9
5551007
(555) 100‑7 + ext 9
>&&&‑&&&&&‑&&
D1234567xy
D12‑34567‑XY
<&&&‑&&&&&‑&&
D1234567xy
d12‑34567‑xy