A script-enabled browser is required for this page to function properly.

<programUnits> XML tag

The <programUnits> tag delimits any PL/SQL that you want to add to the report definition. The <programUnits> tag typically has <function> tags nested within it.

Syntax

<programUnits>
  program_unit_definitions
</programUnits>

Examples

The following example shows a segment of an XML report definition that defines some PL/SQL. The <programUnits> tag is outside of the <layout> tag and that the functions are referenced from fields in the layout through the formatTrigger attribute.

<layout>
  <section name="header"> 
    <field name="F_ssn1" source="ssn1" 
      formatTrigger="F_ssn1FormatTrigger"/>
  </section>
  <section name="main">
    <field name="F_ssn" source="ssn" 
      formatTrigger="F_ssnFormatTrigger"/> 
  </section>
</layout>
<programUnits> 
  <function name="F_ssn1FormatTrigger"> 
    <![CDATA[
      function F_ssn1FormatTrigger return boolean is
      begin
        SRW.SET_HYPERLINK('#EMP_DETAILS_&<' || LTRIM(TO_CHAR(:SSN)) 
          || '>');
        return (TRUE);
      end;
     ]]>
  </function> 
  <function name="F_ssnFormatTrigger"> 
    <![CDATA[
      function F_ssnFormatTrigger return boolean is
      begin
        SRW.SET_LINKTAG('EMP_DETAILS_&<' || LTRIM(TO_CHAR(:SSN)) 
          || '>');
        return (TRUE);
      end;
     ]]>
  </function> 
</programUnits>  

See also

About XML in reports

Oracle Reports XML tags