# Export report data

**URL:** <https://forum.inductiveautomation.com/t/export-report-data/32103>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 10, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/export-report-data/32103 "2020-02-10T19:32:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drinaldi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drinaldi/32/32068_2.png) [@drinaldi](https://forum.inductiveautomation.com/u/drinaldi)\
**Post date:** [February 10, 2020, 7:32pm UTC](https://forum.inductiveautomation.com/t/export-report-data/32103/1 "2020-02-10T19:32:54Z")

</div>

Hello, trying to export data from a report between 2 times. it produces data but not between the times I select.  
the report displays data for each hour. the report always gets todays data even with a date range of a different day.  
thanks

=============================================================================

overrides = {“event.source.parent.getComponent(‘Report Viewer’).StartDate”:“event.source.parent.StartDate”, “event.source.parent.getComponent(‘Report Viewer’).EndDate”:“event.source.parent.EndDate”}

csv = system.report.executeReport(path=event.source.parent.getComponent(‘Report Viewer’).reportPath, project=“MainSorter”, parameters=overrides, fileType=“csv”)

reportID = event.source.parent.getComponent(‘Report Viewer’).reportPath  
filePath = system.file.saveFile(reportID, “csv”, “Comma Separated Values”)

if filePath:  
system.file.writeFile(filePath, csv)

---

<div class="post-metadata">

**Author:** ![camatt3](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@camatt3](https://forum.inductiveautomation.com/u/camatt3)\
**Post date:** [February 11, 2020, 4:34am UTC](https://forum.inductiveautomation.com/t/export-report-data/32103/2 "2020-02-11T04:34:50Z")

</div>

```auto
overrides = {"StartDate":event.source.parent.StartDate, "EndDate":event.source.parent.EndDate}

csv = system.report.executeReport(path=event.source.parent.getComponent('Report Viewer').reportPath, project="MainSorter", parameters=overrides, fileType="csv")

reportID = event.source.parent.getComponent('Report Viewer').reportPath
filePath = system.file.saveFile(reportID, "csv", "Comma Separated Values")

if filePath:
	system.file.writeFile(filePath, csv)

```

---

<div class="post-metadata">

**Author:** ![drinaldi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drinaldi/32/32068_2.png) [@drinaldi](https://forum.inductiveautomation.com/u/drinaldi)\
**Post date:** [February 11, 2020, 12:48pm UTC](https://forum.inductiveautomation.com/t/export-report-data/32103/3 "2020-02-11T12:48:29Z")

</div>

Wow, that worked. So leaving off the entire path to the start/end properties was the key?  
Thank you very much 🙂

---

<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:** [February 11, 2020, 1:15pm UTC](https://forum.inductiveautomation.com/t/export-report-data/32103/4 "2020-02-11T13:15:14Z")

</div>

You also constructed your overrides with quoted strings. Quoted strings are constants–they don’t execute.
