Crystal Reports 10: The Complete Reference
Crystal Reports includes various text formatting features that enhance reporting capabilities. Some are designed for use with foreign-language versions of the report writer (such as Japanese), while others simply provide enhanced functionality for more reporting situations.
A subtle feature that may not be immediately noticeable is fractional point sizes for fonts. If you use the Point Size drop-down list either in the Format toolbar or from the Font tab of the Format Editor, you ll see that only whole-number point- size values are available. However, if you click inside the drop-down list, you can then type values directly into the drop-down list, rather than choosing predefined numbers . If you want to use a 10.5 point size instead of a whole number, simply type 10.5 and press ENTER. You may type in sizes in ½-point increments (10.5 will work, but 10.25 will round to 10.5).
You ll also notice a Text Rotation option on the Format Editor Common tab. This allows you to rotate objects based on TrueType or built-in printer fonts to 90 degrees (sideways from bottom to top) or 270 degrees ( sideways from top to bottom). Just choose the desired rotation from the drop-down list. You ll probably need to adjust the height and width of the now- rotated text to properly show all the material in the object.
Tip | You can make innovative use of text rotation by using multiple report sections and the Underlay section formatting option, described in Chapter 10. For example, by placing a rotated text object in Page Header b (which is formatted with the Underlay option), you can have vertical text flow down alongside the rest of your report on every page. This technique can be helpful for replicating special forms, for example. |
Format Editor Paragraph Formatting Tab
If you format a string or memo database field or a text object, Crystal Reports presents an additional Paragraph tab on the Formula Editor, as shown in Figure 9-6. Use these options to determine how multiple lines of text or data will be formatted:
-
Indentation ”First Line Indicates the amount of space the first line in each paragraph will be indented. The first line of the text or any line after a carriage return is considered the first line of a paragraph.
-
Indentation ”Left Indicates the amount of space that the entire field will be indented from the left side of the object.
-
Indentation ”Right Indicates the amount of space that the entire field will be indented from the right side of the object.
-
Spacing ”Line Spacing Adds vertical blank space between each line in the paragraph. Choose the Multiple option to choose a multiple of the normal spacing (for example, two times normal spacing). Choose the Exact option to choose a specific point size for line spacing (for example, 5 points).
-
Spacing ”Of x Times Normal Specifies the associated number for the Multiple or Exact Line Spacing option.
-
Reading Order Specifies whether the text in the object that s being formatted will be read from left to right, or right to left. This option generally applies to non-English versions of Crystal Reports, and while it doesn t reverse the display of characters that make up a field, it does rearrange placement of punctuation marks that appear at the end of fields.
Figure 9-6: Paragraph Formatting tab on Format Editor
Using HTML and RTF Text Interpretation
Figure 9-6 also shows the Text Interpretation drop-down list on the Paragraph Formatting tab (you ll see this option only with string or memo database fields ”not with text objects).
Available options in this drop-down list are None (the default), HTML Text (Hypertext Markup Language), and RTF Text (Rich Text Format). HTML text is often associated with the Web ”web pages are encoded in HTML. RTF is a standard text format that is interchangeable between most popular word processors and page publishing programs.
If you leave the default Text Interpretation option of None chosen , Crystal Reports simply displays the value from the database as it actually appears in the database. If the field contains special formatting codes, they ll just appear on the report directly. If your database string or memo fields contain text with special HTML or RTF formatting codes to describe fonts, colors, and special formatting, choose the appropriate HTML or RTF Text Interpretation option. Crystal Reports will convert these formatting codes into actual typeface, point size, color , and formatting options. Notice how a Text Interpretation setting of None (as opposed to a setting of HTML) displays a database field that s encoded using the Hypertext Markup Language.
Tip | For a list of specific HTML tags that Crystal Reports interprets, search online help for Paragraph Formatting tab. |