Using RWWebServiceUtil to Test RWWebService

20-2 Publishing Reports to the Web with Oracle Reports Services In order to use the same report definition file to burst and distribute to data-driven formats such as XML and DELIMITEDDATA, as well as to layout-driven formats such as PDF and ENHANCEDSPREADSHEET, you must ensure the following requirements are met: ■ The distribution XML file must specify the include element. For example: lt;include src=mainSectiongt; ■ The Repeat On property must be set appropriately for the sections specified in the distribution XML file. ■ The sections specified in the distribution XML file in the report paper layout must not be empty. 20.2 What’s New In This Release? Oracle Reports 11g Release 1 11.1.1 expands bursting and distribution to all output formats, as well as other new features, as described in Table 20–1 a subset of Table 1–1, 11g Functionality vs. 10g Functionality :

20.3 Introduction to Distribution XML Files

This section discusses the use of XML files related to distribution: ■ The distribution.dtd File ■ Using Variables Within Attributes Table 20–1 11g Distribution and Bursting Features vs. 10g Functionality 11g New Features Equivalent 10g Functionality Full support for bursting and distribution to all destinations and output formats, including: ■ all out-of-the-box and pluggable destinations ■ data-driven formats such as XML and DELIMITEDDATA, as well as layout-based formats such as the new ENHANCEDSPREADSHEET format Limited destinations and output formats for bursting and distribution. System parameters in report definition honored for distribution. Distributed output honors the DESTYPE, DESFORMAT, and DESNAME system parameters specified in the report definition. For example, if you define system parameters in the report: DESTYPE=FILE, DESFORMAT=PDF, and DESNAME=tmpa.pdf the report output is generated and distributed using these values without the parameter values needing to be specified in the distribution XML file or on the command line. Additionally, if users change the values of DESTYPE, DESFORMAT, or DESNAME on the Runtime Parameter Form during runtime, or if Oracle Reports sets the value of these system parameter based on a runtime calculation, the parameter values are honored when the report is distributed. Values for system parameters DESTYPE, DESFORMAT, and DESNAME specified in the report definition are not honored for distributed output; to change the default values of these system parameters for distributed reports, they must be specified in the distribution file or on the command line. Security check for distribution destinations. Ability to define security policies for distribution jobs. For example, you can define a security policy that specifies report output may not be burst to ENHANCEDSPREADSHEET format; if the distribution XML file specifies ENHANCEDSPREADSHEET format, the attempt to generate a report to this output format displays an error. No security check performed for destinations specified in the distribution XML file. Other improvements such as tolerance support for burst jobs and improved diagnostics. NA Creating Advanced Distributions 20-3

20.3.1 The distribution.dtd File

When you create a distribution XML file, you follow the syntax defined in the distribution.dtd file located in the following directory on both Windows and UNIX: ORACLE_HOME\reports\dtd As you look through the following sections, it may be useful to you to print the distribution.dtd file and refer to it as you review the descriptions of the elements and attributes. The distribution.dtd file lists all elements that are valid within a distribution XML file. Each of these elements have attributes. Attributes that come with default values need not be specified, unless you wish to override the default. You can create a dynamic distribution by introducing variable values into many different attributes. Variable values reference columns that are present in the report that is using the distribution XML file.

20.3.2 Using Variables Within Attributes

You can use variables within attributes by entering amp;column_name or amp;lt;column_namegt; in the place of a static value. The variable syntax you use depends on whether the value is expressed by itself or in combination with other values or strings. For example, a value for a to attribute in a mail element might be expressed as either: mail id=a2 to=amp;email … or Note: Information provided in the distribution XML file is case-sensitive. You must preserve case of various elements and attributes as specified in the distribution.dtd file. Note: The ampersand and less-than symbol have specific meanings in XML, but they are also required symbols for certain Oracle Reports command line options for example, lexical parameters require the ampersand symbol. To avoid conflict with the XML meanings of these symbols when you set up variables, specify the encoded version of the ampersand amp; and less-than and greater-than symbols lt; and gt;. For example: Here is what the variable looks like improperly coded in an XML file: mail id=a1 to=managermycompany.com … Here is what the variable looks like properly coded in an XML file: mail id=a1 to=amp;lt;managergt;mycompany.com … There is no special requirement for the greater-than symbol used with variables, but for consistency, we recommend that you use the encoded version gt;. 20-4 Publishing Reports to the Web with Oracle Reports Services mail id=a3 to=amp;lt;first_namegt;.amp;lt;last_namegt;myco.com … In the first example id=a2, the variables referenced column email contains a full e-mail address and does not require additional information. The second example id=a3 uses a combination of variable values first_name and last_name and static text to construct an e-mail address static text is the period after first_name and myco.com. In both cases, you will get dynamic e-mail addressing. The example you use will depend on whether the variable contains all the information you need or requires additional information in order to be complete. For more complex layouts, you can also reference report columns you created with PLSQL formulas. For example, in your report you may define the PLSQL column: PLSQL formula CF_MAILID: return:first_name||.||:last_name Youd reference this column in the distribution XML file as: to=amp;lt;CF_MAILIDgt;mycompany.com

20.4 Elements of a Distribution XML File

The elements of a distribution XML file include: ■ destinations ■ foreach ■ mail ■ body ■ attach ■ include ■ file ■ printer ■ destype ■ property Most of these elements have attributes that define the behavior of the element. The following sections describe the distribution XML file elements and their associated attributes. Section 20.5, Distribution XML File Examples provides use cases that demonstrate the distribution XML file elements and attributes in typical scenarios.

20.4.1 destinations

Example destinations one or more distribution specifications destinations RequiredOptional Required. You must have no more or less than one destinations element in your distribution XML file. Creating Advanced Distributions 20-5 Description The destinations element opens and closes the content area of the distribution XML file. In terms of the distribution XML files tagging hierarchy, all the other elements are subordinate to the destinations element.

20.4.2 foreach

Example foreach mail id=a1 to=my_addresseemycompany.com subject=Fourth Quarter Results attach format=pdf name=dept_amp;lt;department_IDgt;.pdf srcType=report instance=this include src=mainSection attach mail foreach or mail id=a4 to=recipientmycompany.com subject=Regional Results foreach attach format=pdf name=report.pdf srcType=report instance=all include src=mainSection attach foreach mail RequiredOptional Optional. You can have as many foreach elements as you require. Description Use the foreach element to burst your distribution against a repeating group. You can use foreach only when the associated report definition file either RDF, JSP, or XML has its Repeat On property for the section that will be burst set to an appropriate group. The foreach element specifies that the distribution defined between its open and close tags should be performed for each repeating group. The Repeat On property can be set for a report section Header, Main, and Trailer to associate a data model break group to a section. By setting the Repeat On property for a section, you can generate multiple instances of a section, or a repeating section. When you implement bursting and distribution in a report, you can generate section-level distribution by setting the Repeat On property for a section to a data model break group, which generates an instance of the section for each column record of that break group. Then, you can distribute each instance of the section as appropriate for example, to individual managers in the MANAGER group. If you set the Repeat On property for more than one of the Header, Main, and Trailer sections of a report, all Repeat On property values must be set to the same data model break group. If the Repeat On property for any one of the Header, Main, and Trailer sections is set to a different data model break group, Oracle Reports raises the following messages: REP-177: Error while running in remote server REP-34320: Report sections used in destination destination id do not repeat on the same group