Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\ui_templt_report.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Report Templates</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T16:11:31Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Report Templates" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11947-01" /> <link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="themes.htm" title="Managing Themes and Templates" type="text/html" /> <link rel="up" href="ui_templt.htm" title="Customizing Templates" type="text/html" /> <link rel="up" href="ui_templt_report.htm" title="Report Templates" type="text/html" /> <link rel="prev" href="ui_templt_reg.htm" title="Previous" type="text/html" /> <link rel="next" href="ui_custom_css.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="themes.htm" title="Managing Themes and Templates">Managing Themes and Templates</a> > <a href="ui_templt.htm" title="Customizing Templates">Customizing Templates</a> > Report Templates</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="ui_templt_reg.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="ui_custom_css.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABFFGGJ" name="BABFFGGJ"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="HTMDB25707" id="HTMDB25707"></a>Report <a id="sthref1798" name="sthref1798"></a><a id="sthref1799" name="sthref1799"></a><a id="sthref1800" name="sthref1800"></a>Templates</h1> <p>Report column templates provide you with control over the results of a row from a SQL query. This type of template defines a cell, not an entire row.</p> <p>Each report template identifies column names using the syntax <code>#1#, #2#, #3#</code>, and so on. You can also name columns using column name substitution syntax such as <code>#ENAME#</code> or <code>#EMPNO#</code>. You can reference any item from your application within your template. For example, to reference an item called <code><span class="codeinlineitalic">ABC.</span></code> in your template, you could include the exact substitution string <code><span class="codeinlineitalic">&ABC.</span></code>. The actual value of ABC. would be provided by an end user editing an item in your application named <code><span class="codeinlineitalic">ABC</span></code>.</p> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> <a href="bldapp_rpt.htm#CHDCFJBF">"Creating Reports"</a>, <a href="ui_templt.htm#BABBFHJA">"Customizing Templates"</a>, and <a href="ui_themes.htm#BABJEDBB">"Managing Themes"</a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> <a id="sthref1801" name="sthref1801"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#BABICIDB">About Generic Column Templates and Named Column Templates</a></p> </li> <li> <p><a href="#BABHFAIC">Report Column Template Attributes for Generic Column Templates</a></p> </li> <li> <p><a href="#BABDHFDA">Report Column Template Attributes for Named Column Templates</a></p> </li> <li> <p><a href="#BABHFIGG">About Using JavaScript in Column Templates</a></p> </li> </ul> <a id="BABICIDB" name="BABICIDB"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25708" id="HTMDB25708"></a>About Generic Column Templates and Named Column Templates</h2> <p>Oracle Application Express includes two types of report templates:</p> <ul> <li> <p>Generic column templates</p> </li> <li> <p>Named column templates</p> </li> </ul> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1802" name="sthref1802"></a> <h3><a name="HTMDB25709" id="HTMDB25709"></a>Generic Column <a id="sthref1803" name="sthref1803"></a>Templates</h3> <p>A generic column template determines the appearance of a report by defining the look of the column once. This look is then repeated as many times as is necessary, based on the number of columns specified in the report's definition. This type of template is limited to reports that have a standard row and column structure. Additional style can be applied to a report using this type of template through the use of conditions.</p> <p>The following example demonstrates how to have each column use a specific style:</p> <pre xml:space="preserve" class="oac_no_warn"> <td class="tabledata" align="#ALIGN#">#COLUMN_VALUE#</td> </pre> <p>This example assumes your page template includes a CSS containing the class <code>tabledata</code>. This example also demonstrates the use the substitution strings <code>#ALIGN#</code> and <code>#COLUMN_VALUE#</code>. If you actually ran this report, these substitution strings would be replaced with values generated by the results of a SQL query.</p> <p>If your query uses an expression in the select list, it is a good idea to create an alias for the columns to avoid run time errors. For example, suppose your query was as follows:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT ename, (sal + comm) * 12 FROM emp </pre> <p>You could rewrite the query to alias the columns as follows:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT ename, (sal + comm) * 12 yearly_comp FROM emp </pre></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1804" name="sthref1804"></a> <h3><a name="HTMDB25710" id="HTMDB25710"></a>Named Column <a id="sthref1805" name="sthref1805"></a>Templates</h3> <p>Named column templates allow for more flexibility in report design. However, because they reference columns by name, they can only be used by reports that are based on those columns. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <tr><td>#ENAME#</td><td>#SAL#</td></tr> </pre> <p>Although named column templates offer flexibility, you may need to create a new template for each query. You can also include a position notation. The following example demonstrates how to use following HTML and substitution strings:</p> <pre xml:space="preserve" class="oac_no_warn"> <tr><td>#ENAME#</td><td>#SAL#</td></tr> <tr><td>#1#</td><td>#2#</td></tr> </pre></div> <!-- class="sect4" --></div> <!-- class="sect3" --> <a id="BABHFAIC" name="BABHFAIC"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25711" id="HTMDB25711"></a>Report Column Template Attributes for Generic Column Templates</h2> <p>This section describes specific sections of the Edit Report Template page for Generic Column Templates. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click <span class="bold">Show All</span>.</p> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1806" name="sthref1806"></a> <h3><a name="HTMDB25712" id="HTMDB25712"></a>Report Template<a id="sthref1807" name="sthref1807"></a></h3> <p><span class="bold">Template Name</span> identifies the name of the template. <span class="bold">Template Type</span> indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference the <code>#COLUMN_VALUE#</code> substitution string in the template.</p> <p><span class="bold">Theme</span> indicates the theme to which the template is a member. <span class="bold">Template Class</span> identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class. Use the <span class="bold">Translatable</span> check box to indicate the template contains text strings that require translation.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1808" name="sthref1808"></a> <h3><a name="HTMDB25713" id="HTMDB25713"></a>Template <a id="sthref1809" name="sthref1809"></a>Subscription</h3> <p>Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.</p> <p>To load a new copy of a master template, click <span class="bold">Refresh Template</span>.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1810" name="sthref1810"></a> <h3><a name="HTMDB25714" id="HTMDB25714"></a>Before Rows<a id="sthref1811" name="sthref1811"></a></h3> <p>In <span class="bold"><a id="sthref1812" name="sthref1812"></a><a id="sthref1813" name="sthref1813"></a><a id="sthref1814" name="sthref1814"></a>Before Rows</span>, enter HTML that displays once at the beginning of a report template. Opening an HTML table is a common use of this attribute as shown in the following example:</p> <pre xml:space="preserve" class="oac_no_warn"> <table> </pre> <p>You can identify column headers using the syntax <code>#1#</code>, <code>#2#</code>, <code>#3#</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <th>#1#</th><th>#2#</th><th>#3#</th> </pre> <p>You can include pagination above a report by including the substitution string <code>#TOP_PAGINATION#</code>. This substitution string generates HTML that starts with an opening <code><tr></code> tag and ends with a closing <code></tr></code> tag. For example, to include an open table tag and the <code>#TOP_PAGINATION#</code> substitution string, you would enter the following:</p> <pre xml:space="preserve" class="oac_no_warn"> <table>#TOP_PAGINATION# </pre> <p>You can also include the substitution string<a id="sthref1815" name="sthref1815"></a> <code>#CSV_LINK#</code> to include support for exporting your report to comma-separated value (CSV) format, a format compatible with most spreadsheet programs.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1816" name="sthref1816"></a> <h3><a name="HTMDB25715" id="HTMDB25715"></a>Column Heading<a id="sthref1817" name="sthref1817"></a><a id="sthref1818" name="sthref1818"></a><a id="sthref1819" name="sthref1819"></a>s</h3> <p>Use <span class="bold">Column Heading Template</span> to add color to each column header cell. Note that the text of this attribute must indicate where the cell heading text will be colorized. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <th #ALIGNMENT#>#COLUMN_HEADER#</th> </pre> <p>If you do not want any column headings, enter the following:</p> <pre xml:space="preserve" class="oac_no_warn"> OMIT </pre> <p>If you do use this attribute, Application Express engine applies the default column heading template.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1820" name="sthref1820"></a> <h3><a name="HTMDB25716" id="HTMDB25716"></a>Before Each Row<a id="sthref1821" name="sthref1821"></a></h3> <p>In <span class="bold"><a id="sthref1822" name="sthref1822"></a>Before Each Row,</span> enter text to display before all columns in the report. Use this attribute to open a new HTML row. <span class="bold">Before Each Row</span> supports the following substitution strings:</p> <ul> <li> <p><code><a id="sthref1823" name="sthref1823"></a>#ROWNUM#</code></p> <p>Use this substitution string to specify the current row.</p> </li> <li> <p><code><a id="sthref1824" name="sthref1824"></a>#COLCOUNT#</code></p> <p>Use this substitution string to specify the number of columns.</p> </li> <li> <p><code><a id="sthref1825" name="sthref1825"></a>#HIGHLIGHT_ROW#</code></p> <p>Use this substitution string to specify the number of highlighted rows.</p> </li> </ul> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1826" name="sthref1826"></a> <h3><a name="HTMDB25717" id="HTMDB25717"></a>Column <a id="sthref1827" name="sthref1827"></a><a id="sthref1828" name="sthref1828"></a>Templates</h3> <p>Column templates define the look of each column. You can define up to four column templates; each can be conditional. For example, you can have different background colors for even and odd rows, or highlight rows that meet a PL/SQL defined condition.</p> <p>In each Column Template, you define the look of each column. Column Templates support the substitution strings described in <a href="#BABDJAEF">Table: Column Template Substitution Strings</a>.</p> <div class="tblformal"><a id="sthref1829" name="sthref1829"></a><a id="BABDJAEF" name="BABDJAEF"></a> <p class="titleintable">Column Template Substitution Strings</p> <table class="Formal" title="Column Template Substitution Strings" summary="This table describes available describes supported column template substitution strings." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t34">Substitution String</th> <th align="left" valign="bottom" id="r1c2-t34">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t34" headers="r1c1-t34"> <p><code>#ALIGNMENT#</code></p> </td> <td align="left" headers="r2c1-t34 r1c2-t34"> <p>Determines the column alignment. Specified by the user.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t34" headers="r1c1-t34"> <p><code>#COLCOUNT#</code></p> </td> <td align="left" headers="r3c1-t34 r1c2-t34"> <p>Defines the count of the number of columns.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t34" headers="r1c1-t34"> <p><code>#COLNUM#</code></p> </td> <td align="left" headers="r4c1-t34 r1c2-t34"> <p>Defines the current column number.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t34" headers="r1c1-t34"> <p><code>#COLUMN_HEADER#</code></p> </td> <td align="left" headers="r5c1-t34 r1c2-t34"> <p>Defines the column header.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t34" headers="r1c1-t34"> <p><code>#COLUMN_VALUE#</code></p> </td> <td align="left" headers="r6c1-t34 r1c2-t34"> <p>Replaced with the value of the column.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t34" headers="r1c1-t34"> <p><code>#ROWNUM#</code></p> </td> <td align="left" headers="r7c1-t34 r1c2-t34"> <p>Specifies the current row number.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <p>Consider the following example:</p> <pre xml:space="preserve" class="oac_no_warn"> <td> #ALIGNMENT#>#COLUMN_VALUE#</td> </pre> <p>If you actually ran this report, these substitution strings would be replaced with values generated by the results of a SQL query.</p> <p>By creating conditions, you can create a report that displays columns differently depending on whether the specified condition is met. To specify a column template be used conditionally, select a condition type from the Column Template Condition list. Valid values include:</p> <ul> <li> <p><span class="bold">Use Based on PL/SQL Expression.</span> Conditionally formats columns based on data in that row.</p> </li> <li> <p><span class="bold">Use for Even Numbered Rows.</span> Conditionally formats even numbered rows.</p> </li> <li> <p><span class="bold">Use for Odd Numbered Rows.</span> Conditionally formats odd numbered rows.</p> </li> </ul> <p>If you select <span class="bold">Use Based on PL/SQL Expression</span>, the next step is to enter a PL/SQL expression in the Column Template Expression field. For example, the following expression displays a value in bold if the value is greater than 2000:</p> <pre xml:space="preserve" class="oac_no_warn"> #SAL# > 2000 </pre> <p>Note that you could also use the substitution string <code>#ROWNUM#</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> #ROWNUM# > 2000 </pre></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1830" name="sthref1830"></a> <h3><a name="HTMDB25718" id="HTMDB25718"></a>After Each Row</h3> <p>In <span class="bold"><a id="sthref1831" name="sthref1831"></a><a id="sthref1832" name="sthref1832"></a>After Each Row,</span> enter HTML that displays after all columns in the report display. This attribute is often used to close an HTML table row. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> </tr> </pre></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1833" name="sthref1833"></a> <h3><a name="HTMDB25719" id="HTMDB25719"></a>After Rows<a id="sthref1834" name="sthref1834"></a><a id="sthref1835" name="sthref1835"></a></h3> <p>Use <span class="bold">After Rows</span> to specify text that should display after the last row. A common use of this attribute is to close the HTML table tag. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> </table> </pre> <p>The After Rows attribute supports the following substitution strings:</p> <ul> <li> <p><code>#PAGINATION#</code></p> <p>Replaced with a pagination attribute.</p> </li> <li> <p><code>#COLCOUNT#</code></p> <p>Substituted at run time with the number of columns defined in the report.</p> </li> </ul> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1836" name="sthref1836"></a> <h3><a name="HTMDB25720" id="HTMDB25720"></a>Row Highlighting<a id="sthref1837" name="sthref1837"></a></h3> <p>Use <span class="bold">Background color for checked row</span> to control the background color of a report row when the row selector is checked. Use <span class="bold">Background color for current row</span> to control the background color of a report row when the user moves the mouse over the row.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1838" name="sthref1838"></a> <h3><a name="HTMDB25721" id="HTMDB25721"></a><a id="sthref1839" name="sthref1839"></a>Pagination Subtemplate</h3> <p>The Pagination Subtemplate section contains attributes for editing the Pagination Template, Next Page Template, Previous Page Template, Next Set Template, and Previous Template. Pagination Subtemplates support the substitution strings <code>#PAGINATION_NEXT#</code>, <code>#PAGINATION_NEXT_SET#</code>, <code>#PAGINATION_PREVIOUS#</code> and <code>#PAGINATION_PREVIOUS_SET#</code>. <a href="#BABFCJGA">Table: Pagination Subtemplate Attributes</a> describes these templates.</p> <div class="tblformal"><a id="sthref1840" name="sthref1840"></a><a id="sthref1841" name="sthref1841"></a> <p class="titleintable">Pagination Subtemplate Attributes</p> <table class="Formal" title="Pagination Subtemplate Attributes" summary="This table describes the Pagination Subtemplate attributes available on the Report Column Template page." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="40%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t35">Pagination Subtemplate Attribute</th> <th align="left" valign="bottom" id="r1c2-t35">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t35" headers="r1c1-t35"> <p><a id="sthref1842" name="sthref1842"></a>Pagination Template</p> </td> <td align="left" headers="r2c1-t35 r1c2-t35"> <p>Applies to the entire pagination subtemplate. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <span class="instructiontext">#TEXT#</span> </pre> <p>You can use the substitution string <code>#TEXT#</code> to specify where you want the pagination subtemplate to display.</p> <p>Use the other Pagination Subtemplate attributes to modify individual items.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t35" headers="r1c1-t35"> <p><a id="sthref1843" name="sthref1843"></a>Next Page Template</p> </td> <td align="left" headers="r3c1-t35 r1c2-t35"> <p>Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">next</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t35" headers="r1c1-t35"> <p><a id="sthref1844" name="sthref1844"></a>Previous Page Template</p> </td> <td align="left" headers="r4c1-t35 r1c2-t35"> <p>Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">previous</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t35" headers="r1c1-t35"> <p><a id="sthref1845" name="sthref1845"></a>Next Set Template</p> </td> <td align="left" headers="r5c1-t35 r1c2-t35"> <p>Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">next set</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t35" headers="r1c1-t35"> <p><a id="sthref1846" name="sthref1846"></a>Previous Set Template</p> </td> <td align="left" headers="r6c1-t35 r1c2-t35"> <p>Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">previous set</a> </pre></td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1847" name="sthref1847"></a> <h3><a name="HTMDB25722" id="HTMDB25722"></a>Comments</h3> <p>Use this attribute to record comments about this component.</p> </div> <!-- class="sect4" --></div> <!-- class="sect3" --> <a id="BABDHFDA" name="BABDHFDA"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25723" id="HTMDB25723"></a>Report Column Template Attributes for Named Column Templates</h2> <p>This section describes specific sections of the Edit Report Template page for Named Column Templates. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click <span class="bold">Show All</span>.</p> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1848" name="sthref1848"></a> <h3><a name="HTMDB25724" id="HTMDB25724"></a><a id="sthref1849" name="sthref1849"></a>Name</h3> <p><span class="bold">Template Name</span> identifies the name of the template. <span class="bold">Template Type</span> indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference the <code>#COLUMN_VALUE#</code> substitution string in the template.</p> <p><span class="bold">Theme</span> indicates the theme to which the template is a member. Use the <span class="bold">Translatable</span> check box to indicate the template contains text strings that require translation. <span class="bold">Template Class</span> identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1850" name="sthref1850"></a> <h3><a name="HTMDB25725" id="HTMDB25725"></a><a id="sthref1851" name="sthref1851"></a>Subscription</h3> <p>Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.</p> <p>To load a new copy of a master template, click <span class="bold">Refresh</span>.</p> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1852" name="sthref1852"></a> <h3><a name="HTMDB25726" id="HTMDB25726"></a>Row <a id="sthref1853" name="sthref1853"></a>Templates</h3> <p>Row templates define the look of each column. You can define up to four row templates, each of which can be conditional.</p> <p>In each Row Template, you define the look of each row. Row Templates support the substitution strings described in <a href="#BABHEBCH">Table: Row Template Substitution Strings</a>.</p> <div class="tblformal"><a id="sthref1854" name="sthref1854"></a><a id="BABHEBCH" name="BABHEBCH"></a> <p class="titleintable">Row Template Substitution Strings</p> <table class="Formal" title="Row Template Substitution Strings" summary="This table describes available describes supported row template substitution strings." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t36">Substitution String</th> <th align="left" valign="bottom" id="r1c2-t36">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t36" headers="r1c1-t36"> <p><code>#ALIGNMENT#</code></p> </td> <td align="left" headers="r2c1-t36 r1c2-t36"> <p>Determines the row alignment. Specified by the user.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t36" headers="r1c1-t36"> <p><code>#COLCOUNT#</code></p> </td> <td align="left" headers="r3c1-t36 r1c2-t36"> <p>Defines the count of the number of columns.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t36" headers="r1c1-t36"> <p><code>#COLNUM#</code></p> </td> <td align="left" headers="r4c1-t36 r1c2-t36"> <p>Defines the current column number.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t36" headers="r1c1-t36"> <p><code>#COLUMN_HEADER#</code></p> </td> <td align="left" headers="r5c1-t36 r1c2-t36"> <p>Defines the column header.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t36" headers="r1c1-t36"> <p><code>#COLUMN_VALUE#</code></p> </td> <td align="left" headers="r6c1-t36 r1c2-t36"> <p>Replaced with the value of the column.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t36" headers="r1c1-t36"> <p><code>#ROWNUM#</code></p> </td> <td align="left" headers="r7c1-t36 r1c2-t36"> <p>Specifies the current row number.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <p>By creating conditions, you can create a report that displays rows differently depending on whether the specified condition is met. To specify a row template be used conditionally, select a condition type from the Column Template Condition list. Valid values include:</p> <ul> <li> <p><span class="bold">Use Based on PL/SQL Expression.</span> Conditionally formats columns based on data in that row.</p> </li> <li> <p><span class="bold">Use for Even Numbered Rows.</span> Conditionally formats even numbered rows.</p> </li> <li> <p><span class="bold">Use for Odd Numbered Rows.</span> Conditionally formats odd numbered rows.</p> </li> </ul> <p>If you select <span class="bold">Use Based on PL/SQL Expression</span>, the next step is to enter a PL/SQL expression in the Column Template Expression field. For example, the following expression displays a value in bold if the value is greater than 2000:</p> <pre xml:space="preserve" class="oac_no_warn"> #SAL# > 2000 </pre> <p>Note that you could also use the substitution string <code>#ROWNUM#</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> #ROWNUM# > 2000 </pre></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1855" name="sthref1855"></a> <h3><a name="HTMDB25727" id="HTMDB25727"></a>Column Headings<a id="sthref1856" name="sthref1856"></a><a id="sthref1857" name="sthref1857"></a></h3> <p>Use this template to add color to each column header cell. The text of this attribute must include help to indicate where the cell heading text should be colorized. If you do not enter a Column Heading Template, then a default column header template is applied. If you do not want any column headings, then enter <code>OMIT</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <th #ALIGNMENT#>#COLUMN_HEADER#</th> </pre></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1858" name="sthref1858"></a> <h3><a name="HTMDB25728" id="HTMDB25728"></a>Before first and after last row text</h3> <p>In <span class="bold"><a id="sthref1859" name="sthref1859"></a><a id="sthref1860" name="sthref1860"></a><a id="sthref1861" name="sthref1861"></a><a id="sthref1862" name="sthref1862"></a>Before Rows</span>, enter HTML that displays once at the beginning of a report template. Opening an HTML table is a common use of this attribute, as shown in the following example:</p> <pre xml:space="preserve" class="oac_no_warn"> <table> </pre> <p>You can identify column headers using the syntax <code>#1#</code>, <code>#2#</code>, <code>#3#</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <th>#1#</th><th>#2#</th><th>#3#</th> </pre> <p>You can include pagination above a report by including the substitution string <code>#TOP_PAGINATION#</code>. This substitution string generates HTML that starts with an opening <code><tr></code> tag and ends with a closing <code></tr></code> tag. For example, to include an open table tag and <code>#TOP_PAGINATION#</code> substitution string, you would enter the following:</p> <pre xml:space="preserve" class="oac_no_warn"> <table>#TOP_PAGINATION# </pre> <p>You can also include the substitution string<a id="sthref1863" name="sthref1863"></a> <code>#CSV_LINK#</code> to include support for exporting your report to CSV format, a format compatible with most spreadsheet programs.</p> <p>Use <span class="bold">After Rows</span> to specify text that should display after the last row. A common use of this attribute is to close the HTML table tag. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> </table> </pre> <p>The After Rows attribute supports the following substitution strings:</p> <ul> <li> <p><code>#PAGINATION#</code></p> <p>Replaced with a pagination attribute.</p> </li> <li> <p><code>#COLCOUNT#</code></p> <p>Substituted at run time with the number of columns defined in the report.</p> </li> </ul> </div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1864" name="sthref1864"></a> <h3><a name="HTMDB25729" id="HTMDB25729"></a><a id="sthref1865" name="sthref1865"></a>Pagination</h3> <p>The Pagination section contains attributes for editing the Pagination Template, Next Page Template, Previous Page Template, Next Set Template, and Previous Template. Pagination Subtemplates support the substitution strings <code>#PAGINATION_NEXT#</code>, <code>#PAGINATION_NEXT_SET#</code>, <code>#PAGINATION_PREVIOUS#</code> and <code>#PAGINATION_PREVIOUS_SET#</code>. <a href="#BABFCJGA">Table: Pagination Subtemplate Attributes</a> describes these templates.</p> <div class="tblformal"><a id="sthref1866" name="sthref1866"></a><a id="BABFCJGA" name="BABFCJGA"></a> <p class="titleintable">Pagination Subtemplate Attributes</p> <table class="Formal" title="Pagination Subtemplate Attributes" summary="This table describes the Pagination Subtemplate attributes available on the Report Column Template page." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="40%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t37">Pagination Subtemplate Attribute</th> <th align="left" valign="bottom" id="r1c2-t37">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t37" headers="r1c1-t37"> <p><a id="sthref1867" name="sthref1867"></a>Pagination Template</p> </td> <td align="left" headers="r2c1-t37 r1c2-t37"> <p>Applies to the entire pagination subtemplate. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <span class="instructiontext">#TEXT#</span> </pre> <p>You can use the substitution string <code>#TEXT#</code> to specify where you want the pagination subtemplate to display.</p> <p>Use the other Pagination Subtemplate attributes to modify individual items.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t37" headers="r1c1-t37"> <p><a id="sthref1868" name="sthref1868"></a>Next Page Template</p> </td> <td align="left" headers="r3c1-t37 r1c2-t37"> <p>Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">next</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t37" headers="r1c1-t37"> <p><a id="sthref1869" name="sthref1869"></a>Previous Page Template</p> </td> <td align="left" headers="r4c1-t37 r1c2-t37"> <p>Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">previous</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t37" headers="r1c1-t37"> <p><a id="sthref1870" name="sthref1870"></a>Next Set Template</p> </td> <td align="left" headers="r5c1-t37 r1c2-t37"> <p>Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">next set</a> </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t37" headers="r1c1-t37"> <p><a id="sthref1871" name="sthref1871"></a>Previous Set Template</p> </td> <td align="left" headers="r6c1-t37 r1c2-t37"> <p>Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a href="#LINK#">previous set</a> </pre></td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --></div> <!-- class="sect4" --> <div class="sect4"><!-- infolevel="all" infotype="General" --><a id="sthref1872" name="sthref1872"></a> <h3><a name="HTMDB25730" id="HTMDB25730"></a>Comments</h3> <p>Use this attribute to record comments about this component.</p> </div> <!-- class="sect4" --></div> <!-- class="sect3" --> <a id="BABHFIGG" name="BABHFIGG"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25731" id="HTMDB25731"></a>About Using JavaScript in Column <a id="sthref1873" name="sthref1873"></a><a id="sthref1874" name="sthref1874"></a><a id="sthref1875" name="sthref1875"></a><a id="sthref1876" name="sthref1876"></a>Templates</h2> <p>You can conditionally display HTML depending upon values in the database using JavaScript. The following example displays an HTML row only if the <code>GROUP_DESC</code> query column is not null:</p> <pre xml:space="preserve" class="oac_no_warn"> <script language="javascript"> IF ( "#GROUP_DESC#" != "" ) document.writeln( "<TR>; <TD BGCOLOR=#336699>;</TD> </TR> </TR> <TD>#GROUP_DESC#</TD> </TR>" ); </TR>" ); </pre> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> <ul> <li> <p>Online Help for information about using specific sections of the Edit Report Template page</p> </li> <li> <p><a href="ui_region.htm#CHDCIJJE">"Understanding Regions"</a></p> </li> </ul> </td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <!-- class="sect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="ui_templt_reg.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="ui_custom_css.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de