Creating a boilerplate object for text Creating a boilerplate object for text that displays every other page Creating a boilerplate text object for HTML tags

How To... 4-63 Chapter 4.9.6.8, Highlighting a row

4.9.2 Text Objects

This section provides procedures for the following tasks that you may perform as you work with text objects: ■ Creating a boilerplate object for text ■ Creating a boilerplate object for text that displays every other page ■ Creating a boilerplate text object for HTML tags ■ Editing text ■ Referencing a field in boilerplate text ■ Linking a boilerplate text object to a file ■ Linking an HTML text object to a file ■ Wrapping text in a field ■ Changing text attributes

4.9.2.1 Creating a boilerplate object for text

To create a boilerplate object for text: 1. In the Paper Design view, Paper Layout view or Paper Parameter Form view, click the Text tool in the tool palette. 2. Click and drag a rectangle. 3. In the new boilerplate object, type the desired text. The text you type is composed of paragraphs which are separated by new lines. Text within a paragraph is word-wrapped inside the boilerplate objects horizontal size. 4. Click outside the boilerplate text object. See also Section 1.8.5, About boilerplate objects

4.9.2.2 Creating a boilerplate object for text that displays every other page

To create a boilerplate object for text that displays every other page: 1. Create a boilerplate text object where you want it to appear on the page, either in the margin, or in a repeating frame expand the repeating frame to make room for the boilerplate text, below the fields in the repeating frame. 2. Double-click the boilerplate text object to display the Property Inspector. Under the Advanced Layout node, set the Format Trigger property by typing the following code in the PLSQL Editor: function XXX_HDRFormatTrigger return boolean is page_num number; begin srw.get_page_numpage_num; if modpage_num, 2 = 0 then returnfalse; else return true; end if; 4-64 Oracle Reports Users Guide to Building Reports end; 3. Run the report to see the boilerplate text appear every other page. See also Section 1.8.5, About boilerplate objects

4.9.2.3 Creating a boilerplate text object for HTML tags

To create a boilerplate text object for HTML tags:

1. In the Paper Design view, click the Text tool in the tool palette.

2. Click and drag a rectangle.

3. In the new boilerplate object, type the desired HTML.

4. Click outside the boilerplate text object.

5. Double-click the boilerplate text object or right-click the object, and choose

Property Inspector .

6. In the Property Inspector, under the Web Settings node, set the Contains HTML

Tags property to Yes. Usage notes When the text objects Contains HTML Tags property is set to Yes, HTML tags and attributes are formatted in your report output as follows: ■ If the report is generated to HTML or HTMLCSS output, all HTML tags and attributes are interpreted and formatted in the output. ■ If the report is generated to other bitmap output formats for example, PDF, RTF, PostScript, a fixed set of HTML tags and attributes are interpreted and formatted in the output, as described in Section 2.8.9, About HTML formatting . Any HTML not in the supported set of tags and attributes are not interpreted, and appear as is in the report output. Example 1: Turning formatting on and off Consider a text boilerplate object that is defined as follows: ibDesign time formatb is merged with span style=font-family:Arial; color:00Frun time formatting instructions.spani With its Contains HTML Tags property set to Yes, this will format as: Design time format is merged with run time formatting instructions. With its Contains HTML Tags property set to No, this will format in the report output as: ibDesign time formatb is merged with span style=font-family:Arial; color:00Frun time formatting instructions.spani Example 2: Boilerplate text object tagged as a hyperlink In a boilerplate text object, you can type the following text: Note: This procedure applies to paper-based reports. How To... 4-65 a href=http:your_webserverreportsmy_report.htmlimg src=oracle.gif a With the Contains HTML tags property set to Yes, this object will appear in HTMLHTMLCSS report output as a graphic oracle.gif , which the end user can click to link to my_report.html. Example 3: Parameter values output to HTML In a boilerplate text object, you can type the following Java Applet, called NervousText.class, which takes the object width and height as parameters: base href=http:cagney.uk.oracle.comjavaNervousText applet code=NervousText.class width=ObjectWidth height=ObjectHeight param name=text value=deptno applet With the Contains HTML tags property set to Yes, this object will be interpreted with the parameters replaced with their actual values, as follows: base href=http:cagney.uk.oracle.comjavaNervousText applet code=NervousText.class width=84 height=72 param name=text value=10 applet See also Section 1.8.5, About boilerplate objects Section 2.5.1, About Parameter Form HTML extensions

4.9.2.4 Editing text