foreach mail Elements of a Distribution XML File

Creating Advanced Distributions 20-9 Description The body element acts as a sub-element to the mail element. It specifies the content or body of the e-mail. With body, you can type a text string between the open and close tags of the body element or use an include sub-element to specify either an external file, a report, or a section of a report. For example: mail id=a1 to=jsmithfoo.com subject=Results body srcType=text Attached are quarterly results. body … or mail id=a1 to=jsmithfoo.com subject=Results body srcType=file include src=d:reportsadminresults.html body … or mail id=a1 to=amp;lt;first_namegt;.amp;lt;last_namegt;myco.com subject=Quarterly Results body srcType=report format=html include src=headerSection body … The body element has three attributes: srcType, format, and instance, described in Table 20–3 .

20.4.5 attach

Example mail id=a1 to=jsmithfoo.com subject=Results body srcType=text Attached are quarterly results. body foreach Table 20–3 Attributes of the body Sub-Element of mail Attribute Valid Values Description srcType file|report|text Default: report The source for content of an e-mail. The content is displayed in the body of the e-mail. In the absence of a specified srcType, the default is used. format html|htmlcss|ascii |delimiteddata Default: html Required when srcType is report with a format other than html, the default; otherwise format is optional. The format of the content. 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 content according to each group instance this or all contained within the same content all. 20-10 Publishing Reports to the Web with Oracle Reports Services attach format=html name=contacts.htm srcType=report instance=all include src=headerSection include src=mainSection attach foreach mail or mail id=DEST1 to=tsmithoracle.com subject=Mail from dest attach srcType=report format=delimiteddata name=myattach.txt include src=report attach mail RequiredOptional Optional. You can have as many attach elements as you require with a mail element. Note that attach is also a sub-element of foreach , and foreach requires that at least one of its sub-elements be used out of mail,file,printer,destype, and attach. Description The attach element specifies attachments to the e-mail. Additionally, attach must have at least one include sub-element, and can have more than one if srcType=report. Table 20–4 lists and describes the attributes of the attach element. Using these attributes in conjunction with the foreach element, you can design a destination that will repeat on a group instance and generate an e-mail for each group attachment. For example: foreach mail id=a2 to=first.namemyco.com,second.namemyco.com, third.namemyco.com, Table 20–4 Attributes of the attach Sub-Element of mail Attribute Valid Values Description format pdf|html|htmlcss|rtf| ascii|xml| delimiteddata| spreadsheet| enhancedspreadsheet| dflt Default: pdf The format of the attached material, for example format=htmlcss. Required when srcType is report and the report format is other than pdf, the default; otherwise format is optional. name string Optional. Variable values allowed. The filename of the attached material. Can also contain variable values that reference columns used in the associated report. See Section 20.3.2 for more information. srcType file|report|text Default: report The source of the attachment, either a file, a report, or text. 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 content according to each group instance this or all contained within the same content all. Creating Advanced Distributions 20-11 fourth.namemyco.com subject=Department Summaries body srcType=text Attached is the breakdown of department summaries for the last quarter. body attach format=htmlcss name=deptsum.html srcType=report instance=this include src=report attach mail foreach By moving the location of the foreach element, you can generate one e-mail with multiple attachments: a separate one for each group instance. mail id=a2 to=first.namemyco.com,second.namemyco.com, third.namemyco.com, fourth.namemyco.com subject=Department Summaries body srcType=text Attached is the breakdown of department summaries for the last quarter. body foreach attach format=htmlcss name=deptsum.html srcType=report instance=this include src=report attach foreach mail

20.4.6 include

Example mail id=a1 to=jsmithfoo.com subject=Q4 body srcType=text Attached are quarterly results. body attach srcType=report format=pdf include src=report attach mail or mail id=a1 to=jsmithfoo.com subject=Q4 body srcType=text Attached are quarterly results. body attach srcType=report format=htmlcss include src=headerSection attach mail or mail id=a1 to=jsmithfoo.com subject=Q4 body srcType=text Attached are quarterly results. body attach srcType=file include src=d:managementreportscurrentQ4.htm attach mail 20-12 Publishing Reports to the Web with Oracle Reports Services RequiredOptional Required when used with body and attach when srcType is report or file, but