# system.report.executeReport

**URL:** <https://forum.inductiveautomation.com/t/system-report-executereport/12229>\
**Category:** Ignition\
**Created:** [October 12, 2016, 8:00pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229 "2016-10-12T20:00:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 12, 2016, 8:00pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/1 "2016-10-12T20:00:46Z")

</div>

Hi, I’m trying to use this function “system.report.executeReport” when I press a button with this code, nothing happen, this is from the manual, where is the error?

```auto

overrides = {"Number":"1", "Operator":"Moises","Description":"Description"}
bytesArray = system.report.executeReport(path="Report", parameters=overrides, fileType="pdf")
```

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 12, 2016, 8:35pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/2 "2016-10-12T20:35:02Z")

</div>

When you say nothing happens, what do you mean by that? Is bytesArray empty/null? There are no errors in the Gateway console? Have you tried wrapping this in a try-except and seeing if an error is thrown? Have you tried turning the Reporting.Scripting logger in the Gateway to trace?

---

<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:** [October 12, 2016, 8:38pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/3 "2016-10-12T20:38:52Z")

</div>

How do you know it didn’t work? If that’s all of your code, you are throwing away the result. How many bytes did you get back in bytesArray?

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 12, 2016, 8:42pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/4 "2016-10-12T20:42:42Z")

</div>

Sorry I mean I don’t know what to do next, I don’t know how to get the file into my hard drive C:. How can I transform that byte array to a File?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 12, 2016, 8:49pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/5 "2016-10-12T20:49:11Z")

</div>

[system.file.writeFile](https://docs.inductiveautomation.com/display/DOC79/system.file.writeFile) is what you need next. It will take as an argument your byte array. Be sure to save the file with a .pdf extension so your computer knows what to do with it when a user double clicks on the saved file.

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 12, 2016, 9:14pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/6 "2016-10-12T21:14:44Z")

</div>

Thanks you Kathy! it works

---

<div class="post-metadata">

**Author:** ![tohhy-pm17](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@tohhy-pm17](https://forum.inductiveautomation.com/u/tohhy-pm17)\
**Post date:** [March 19, 2021, 3:36am UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/7 "2021-03-19T03:36:28Z")

</div>

Hi Bro, MoisesZV. Can you show me the works that you have done for system.report.executeReport

---

<div class="post-metadata">

**Author:** ![tohhy-pm17](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@tohhy-pm17](https://forum.inductiveautomation.com/u/tohhy-pm17)\
**Post date:** [March 19, 2021, 4:20am UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/8 "2021-03-19T04:20:26Z")

</div>

Hi, may I know what actually I need to write for path and parameters.

 ![a](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/7/3779c633f8aa4e5ca6a3977a440690ae71ce5d89.png)

The image above dint explain clearly what actually need to write the path and project. Anyone can explain ? Thanks in advence.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 19, 2021, 2:50pm UTC](https://forum.inductiveautomation.com/t/system-report-executereport/12229/9 "2021-03-19T14:50:03Z")

</div>

There’s an example at the bottom of that page.
