# system.report.executeAndDistribute ()

**URL:** <https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473>\
**Category:** Ignition\
**Created:** [May 11, 2022, 5:18pm UTC](https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473 "2022-05-11T17:18:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JORDAN\_PEREZ\_CABRERA](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@JORDAN\_PEREZ\_CABRERA](https://forum.inductiveautomation.com/u/JORDAN_PEREZ_CABRERA)\
**Post date:** [May 11, 2022, 5:18pm UTC](https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473/1 "2022-05-11T17:18:48Z")

</div>

Hi guys, I am trying to run and save a report in pdf format, but it saves in HTML format.  
This is my programming code:

```auto
settings = {"path":"C:\\Path", "fileName":"Reporte.pdf", "format":"PDF"}
array = system.report.executeAndDistribute(path="Reporting", project="IgnitionCoreTroubleshooting", parameters={"Name": "Ignition"}, action="save", actionSettings=settings)

```

do you know where’s the mistake?  
thank’s in advance for all the replies.`Preformatted text`

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [May 11, 2022, 7:07pm UTC](https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473/2 "2022-05-11T19:07:07Z")

</div>

The only thing I can see is maybe the format portion, it is capitalized. Try it lowercased.

```auto
settings = {"path":"C:\\Path", "fileName":"Reporte.pdf", "format":"pdf"}
array = system.report.executeAndDistribute(path="Reporting", project="IgnitionCoreTroubleshooting", parameters={"Name": "Ignition"}, action="save", actionSettings=settings)

```

---

<div class="post-metadata">

**Author:** ![JORDAN\_PEREZ\_CABRERA](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@JORDAN\_PEREZ\_CABRERA](https://forum.inductiveautomation.com/u/JORDAN_PEREZ_CABRERA)\
**Post date:** [May 11, 2022, 9:19pm UTC](https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473/3 "2022-05-11T21:19:30Z")

</div>

I’ve also tried lowercase pdf, but it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 11, 2022, 10:04pm UTC](https://forum.inductiveautomation.com/t/system-report-executeanddistribute/59473/4 "2022-05-11T22:04:19Z")

</div>

Try setting the `reporting.Data` logger to TRACE on the gateway before running your script (there will be a lot of noise, but it will tell you exactly what the save action is trying to do).

HTML is especially odd as output, because the ‘default/fallback’ format is PDF.
