attach Elements of a Distribution XML File

Creating Advanced Distributions 20-13

20.4.7 file

Example On Windows file id=a7 name=c:\management\reports\report.pdf format=pdf include src=report file or file id=MyFiles2 name=c:\My_Departments_Report.txt format=delimiteddata include src=report file On UNIX file id=a7 name=managementreportsreport.pdf format=pdf include src=report file or file id=MyFiles2 name=My_Departments_Report.txt format=delimiteddata include src=report file On Windows or UNIX foreach file id=a7 name=sectionamp;lt;department_idgt;.pdf format=pdf instance=this include src=mainSection file foreach Table 20–5 Attributes of the include Sub-Element When Used with body or attach Attribute Valid Values Description src path and filename report headerSection mainSection trailerSection Required. The source of material specified in the preceding attach, body, file, printer, or destype element. Because the distribution XML file is called when you run a specific report, you need not specify the reports name or location in the src attribute when src=report. path and filename: The preceding element must be either body or attach, with srcType=file. Provide the directory path and file name or just a file name if the file is located in a directory listed in the REPORTS_PATH environment variable. Other values: When the preceding body or attach element specifies srcType=report, specify the entire report report or provide the sections of the report to be included in the body or to be attached for example, headerSection,mainSection, or trailerSection. 20-14 Publishing Reports to the Web with Oracle Reports Services RequiredOptional Optional. You can have as many file elements as you require. Description Use the file element to specify distributions to a file. The file element has one sub-element: include . There must be at least one include sub-element and there may be more between an open and close tag of the file element. When used with the foreach element and the instance=this attribute, the file element can distribute each group instance of a grouped report to separate files. For example, if you group a report on department_id, and there are four departments, you can use the foreachfileinstance=this combination to generate four files, each with a separate departments report. In this case, the file entry in the distribution XML file might look like this: foreach file id=a3 name=dept_amp;lt;department_idgt;.pdf format=pdf instance=this include src=report file foreach In this example, all report sections header, main, and trailer must repeat on the same group instance for example, department_id. Table 20–6 lists and describes the attributes of the file element. Table 20–6 Attributes of the file Element Attribute Valid Values Description id string Required. A keyword, unique within a given distribution XML file, that identifies a particular file element. This can be a combination of a text string and one or more numbers, for example id=a1. The id value must always start with an alpha character. name string Required. Variable values allowed. The location and filename of the destination file. Enter a directory path. Include the filename. For example: Windows: name=d:\reports\q4sales.pdf UNIX: name=reportsq4sales.pdf Can also contain variable values that reference columns used in the associated report. See Section 20.3.2 for more information. format pdf|html|htmlcss|rtf |ascii|xml| delimiteddata| spreadsheet| enhancedspreadsheet| bitmap Default: pdf The destination file format. For example: format=htmlcss instance this|all Default: all Used when the foreach element is also present. With a grouped report that is burst into separate reports, instance specifies whether the groups will be broken into separate files according to each group instance this or all contained within the same file all. Creating Advanced Distributions 20-15

20.4.8 printer

Example On Windows printer id=a1 name=\\server_name\printer_name copies=5 include src=report