# Multiple attachments using system.report.executeAndDistribute

**URL:** <https://forum.inductiveautomation.com/t/multiple-attachments-using-system-report-executeanddistribute/81887>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 14, 2023, 7:45pm UTC](https://forum.inductiveautomation.com/t/multiple-attachments-using-system-report-executeanddistribute/81887 "2023-11-14T19:45:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beckya](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@beckya](https://forum.inductiveautomation.com/u/beckya)\
**Post date:** [November 14, 2023, 7:45pm UTC](https://forum.inductiveautomation.com/t/multiple-attachments-using-system-report-executeanddistribute/81887/1 "2023-11-14T19:45:27Z")

</div>

I am using the reporting module Run Script to send a report through email when data is present in the query. I'd like to be able to attach the file in two formats, pdf and excel in the same email. I currently set the file type as pdf, but didn't know if there is way to add more than one. I tried adding both types to the dictionary but it just sends the first type. Is this even possible? See example script below:

```
hasData = bool(dataMap['query'])
attachmentName = "reportname"+" "+str(system.date.format(system.date.now(),"MM-dd-22 ha"))
if hasData == True:
	system.report.executeAndDistribute(path="reportname",project="projectname",action="email",actionSettings = {"to":["email@noemail.com "], "smtpServerName":"Email", "from":"email@noemail.com", "subject":attachmentName,"attachmentName":attachmentName,"fileType":"pdf"})

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 14, 2023, 9:05pm UTC](https://forum.inductiveautomation.com/t/multiple-attachments-using-system-report-executeanddistribute/81887/2 "2023-11-14T21:05:03Z")

</div>

No, you'll have to do the distribution entirely in your script (use `system.report.execute` for each format), assembling the email manually and sending with `system.net.sendEmail()`.
