Oracle® Fusion Middleware Publishing Reports to the Web with Oracle Reports Services 11g Release 1 (11.1.1) B32121-02 |
|
![]() Previous |
![]() Next |
This section discusses the use of XML files related to distribution:
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.
Note: Information provided in the distribution XML file is case-sensitive. You must preserve case of various elements and attributes as specified in thedistribution.dtd file. |
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.
You can use variables within attributes by entering &column_name
or &<column_name>
in the place of a static value.
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 (& ) and less-than and greater-than symbols (< and > ). For example:
Here is what the variable looks like improperly coded in an XML file: <mail id="a1" to="&<manager>@mycompany.com" … Here is what the variable looks like properly coded in an XML file: <mail id="a1" to="&<manager>@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 ( |
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="&email" …>
or
<mail id="a3" to="&<first_name>.&<last_name>@myco.com …>
In the first example (id="a2"
), the variable's 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 PL/SQL formulas. For example, in your report you may define the PL/SQL column:
PL/SQL formula CF_MAILID: return(:first_name||'.'||:last_name)
You'd reference this column in the distribution XML file as:
to="&<CF_MAILID>@mycompany.com"