About HTML formatting Output Formats and Capabilities

2-66 Oracle Reports Users Guide to Building Reports See also Section 4.7.16.5, Displaying individual pages of HTML report output Section 4.6.10.1.12, Adding navigation controls for HTML page-streamed output using the Property Inspector Section 4.6.10.2.11, Adding navigation controls for HTML page-streamed output using PLSQL

2.8.9 About HTML formatting

Oracle Reports allows a variety of fonts, styles, and colors for text objects in your reports. Through the use of the SRW built-in procedures see the Reference section of the Oracle Reports online Help, you can allow end users to change text attributes at runtime to a whole object, but not to a section of the text for example, different formatting for different parts of a text object. Alternatively, you can use a defined set of HTML formatting tags to format text style bold, italics, underline, and strikethrough and text attributes font name, font color, and font size, and generate formatted text objects in all bitmap output formats supported by Oracle Reports when the objects Contains HTML Tags property is set to Yes. The text objects can have static values as in boilerplate text objects, or dynamic values as in field objects or text file link objects. A boilerplate text object can also have dynamic values if it references a field object or a report-level column. For boilerplate text, the formats specified at design-time are merged with rich text formats obtained at runtime. This feature also supports multibyte text containing HTML tags. In the Paper Design view or Paper Layout view, you can choose the objects to which HTML formatting should be applied by setting their Contains HTML Tags property to Yes. If you run the report from the command line with CONTAINSHTMLTAGS=NO, Oracle Reports will not interpret the HTML tags for the report, regardless of the objects Contains HTML Tags property setting. For HTML and HTMLCSS ouput, the browser will interpret the HTML formatting tags; for other output formats, the HTML tags themselves will appear as is in the report output. The following HTML tags are interpreted by Oracle Reports if they appear in a boilerplate text, text file link, or field object. Any HTML tags or attributes not listed appear as is in non-HTMLHTMLCSS report output. Table 2–2 Supported HTML tags Tag Result b strong Text enclosed in either of these tags will be bold. For example : If the text is formatted as bmy formatb the output will appear as my format i em Text enclosed in either of these tags will be italics. For example : If the text is formatted as imy formati the output will appear as my format Advanced Concepts 2-67 The following are the supported properties for the span tags style attribute: u Text enclosed in this tag will be underlined. For example : If the text is formatted as umy formatu the output will appear as my format s strike Text enclosed in either of these tags will be struck through. For example : If the text is formatted as smy formats the output will appear with a line struck through it. span Generic style container, used to specify font family, size, and color attributes, as described in Table 2–3 . For example : span style=font-family:Times New Roman; font-size:10pt; color:rgb 255,0,0;my formatspan the output will appear in Times New Roman font, size 10 point, in red color. Table 2–3 Supported properties for style attribute of span tag Property Result font-family This property specifies the font name. Oracle Reports provides support for specifying only one font name. If you specify a comma-separated list containing more than one font name, Oracle Reports uses the system default font usually Courier, or its equivalent to render this tag, without generating a warning. For example : font-family: Arial Table 2–2 Cont. Supported HTML tags Tag Result 2-68 Oracle Reports Users Guide to Building Reports font-size This property describes the size of the font. CSS level 2 specifies the following options for this property: absolute_size |relative_size|length|percentage Oracle Reports provides support for only absolute_size and length. where: absolute-size is: xx-small | x-small | small | medium | large | x-large | xx-large xx-small is 7 points x-small is 8 points small is 10 points medium is 12 points large is 14 points x-large is 17 points xx-large is 20 points length is: font_size px | font_sizept For example : font-size:xx-large font-size:12pt Table 2–3 Cont. Supported properties for style attribute of span tag Property Result Advanced Concepts 2-69 Usage notes ■ The supported output formats are: PDF, RTF, HTML, HTMLCSS, and PostScript. ■ HTML formatting supports interleaving and nesting of tags. For example, if you open an italics tag, it is applied to the point of its corresponding closing tag. If a tag is opened several times, it must be closed the same number of times for its effect to cease. ■ Format attributes are not inherited across instances of a text object of the same name or type for example, if they are enclosed in a repeating frame. If, however, a text object contains multiple lines, formatting instructions are inherited across the lines of this object only. color This property describes the color of the enclosing elements text content. Oracle Reports supports the following options for this property: color_name |rgb|rrggbb|rgbr_integer, g_ integer , b_integer|rgbr_value, g_value, b_ value where color names and rgb equivalents are as follows: aqua: 0FF black: 000 blue: 00F fuchsia: F0F gray: 7F7F7F green: 007F00 lime: 0F0 maroon: 7F0000 navy: 00007F olive: 7F7F00 purple: 7F007F red: F00 silver: C0C0C0 teal: 007F7F white: FFF yellow: FF0 For example : color:aqua color:FB0 color:0FACED color:rgb100, 245, 33 color:rgb23, 45, 87 Note : For rgbx, x, x specification, color intensity must be specified in percentage 0-100 or rgb integer 0-255. Any value higher than the allowable range is set to the maximum value. A negative value for any color intensity is invalid. You may mix the percent and rgb integer values for colors; for example: span style=color:rgb100, 125, 3 is equivalent to: span style=color:rgb255, 125, 8 or span style=color:rgb100, 49, 3 Table 2–3 Cont. Supported properties for style attribute of span tag Property Result 2-70 Oracle Reports Users Guide to Building Reports ■ This feature supports HTML tags that are hard-coded or referenced in a boilerplate text object. The tags can also be retrieved from a table column with a field object. A file link object that points to a text file which in turn contains HTML tags is also supported. ■ Oracle Reports tries to find the closest match according to the following criteria for fonts with the same character set: font face font size font style font weight font width If Oracle Reports cannot match the font face, it will try to match the font size; if it cannot match the font size, it will try to match the font style; and so on. For the font lookup alogrithm, refer to the chapter Managing Fonts in Oracle Reports in the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual. In font lookup, it is possible that the font used does not have all the required attributes such as style, size, and so on embedded in data. In this case, the unavailable font attributes do not appear in the report output. Limitations ■ A tag must be specified in its entirety on a single line. If the tag continues to the next line, it is not supported. For example : Myb formatb ■ Only one font name can be specified in the span tags style attribute font-family property. For example : font-family:Arial If you specify a comma-separated list containing more than one font name, Oracle Reports uses the system default font usually Courier, or its equivalent to render this tag, without generating a warning. ■ Entities such as quot; are not supported. For example : span style=font-family: quot;Courier Newquot;;my formatspan You must use literal double quote instead. Examples Example 1: Inline font change In a boilerplate text object, you can specify the text boilerplate as follows: bMybtext With the Contains HTML Tags property set to Yes, the formatted output will look like this: My text Example 2: Single line text with multiple formats Assume a span of text in a boilerplate object or database column that formats on one line, such as: Advanced Concepts 2-71 bMy span style=font-family:CourierHTMLspan buspan style=font-family:Times New RomanFormatsspanu With the Contains HTML Tags property set to Yes, the formatted output will look like this: My HTML Formats Example 3: Multiline text with multiple formats Assume a span of text that formats on multiple lines, such as: Line 1: iMyspan style=font-family:Courier Line 2: HTMLspanispan style=font-family:Times New Romanu Line 3: Formattinguspan. With the Contains HTML Tags property set to Yes, the formatted output will look like this: Line 1: My Line 2: HTML Line 3: Formatting. Note in the preceding example that the formats are maintained in successive lines. See also Section 4.7.5, Generating HTML or HTMLCSS output Section 4.9.2.3, Creating a boilerplate text object for HTML tags Section 4.9.2.7, Linking an HTML text object to a file Section 4.8.4, Selecting HTML tags from the database

2.8.10 About PDF output