# Report CSV

**URL:** <https://forum.inductiveautomation.com/t/report-csv/12503>\
**Category:** Ignition\
**Created:** [December 29, 2016, 10:08am UTC](https://forum.inductiveautomation.com/t/report-csv/12503 "2016-12-29T10:08:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![folgore](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@folgore](https://forum.inductiveautomation.com/u/folgore)\
**Post date:** [December 29, 2016, 10:08am UTC](https://forum.inductiveautomation.com/t/report-csv/12503/1 "2016-12-29T10:08:17Z")

</div>

Hello everybody, I have a problem to generate a CVS file with a scheduled report.  
I need generate a report weekly with 45 history tags.  
The CPU goes to 80-90% and RAM 3GB goes to 9GB (ignition has been set with 10GB of RAM), then the gateway does not make it and crash.

Report parameters:

Aggregation mode: Closest Value  
Return format:Wide  
Sample Size: Interval 10 second

Thank you very much

---

<div class="post-metadata">

**Author:** ![aviolenta](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@aviolenta](https://forum.inductiveautomation.com/u/aviolenta)\
**Post date:** [February 8, 2017, 4:39pm UTC](https://forum.inductiveautomation.com/t/report-csv/12503/2 "2017-02-08T16:39:06Z")

</div>

How much memory are you giving to Ignition service?  
– This can be found in the ignition folder in your ignition.conf file  
– initial heap size?  
– max heap size?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 8, 2017, 4:44pm UTC](https://forum.inductiveautomation.com/t/report-csv/12503/3 "2017-02-08T16:44:05Z")

</div>

What is the date range of the history query?  
A full week?

---

<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:** [February 8, 2017, 5:09pm UTC](https://forum.inductiveautomation.com/t/report-csv/12503/4 "2017-02-08T17:09:22Z")

</div>

If your end goal is CSV data, it would probably be a lot better to write to the CSV directly, rather than rely on the report modules ability to save datasets. A gateway timer script, or even a tag event script trigger by a transaction group (giving you precise scheduling) would be a good option to run a single gateway event that queries the history, then saves it to a file.

The main functions you’ll need are:  
[docs.inductiveautomation.com/di … TagHistory](https://docs.inductiveautomation.com/display/DOC79/system.tag.queryTagHistory)  
[docs.inductiveautomation.com/di … aset.toCSV](https://docs.inductiveautomation.com/display/DOC79/system.dataset.toCSV)  
[docs.inductiveautomation.com/di … .writeFile](https://docs.inductiveautomation.com/display/DOC79/system.file.writeFile)

---

<div class="post-metadata">

**Author:** ![folgore](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@folgore](https://forum.inductiveautomation.com/u/folgore)\
**Post date:** [April 7, 2017, 10:09am UTC](https://forum.inductiveautomation.com/t/report-csv/12503/5 "2017-04-07T10:09:25Z")

</div>

[quote=“MMaynardUSG”]What is the date range of the history query?  
A full week?[/quote]  
No, a full month  
There are about 130000 rows

Thank’s

---

<div class="post-metadata">

**Author:** ![folgore](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@folgore](https://forum.inductiveautomation.com/u/folgore)\
**Post date:** [April 7, 2017, 10:13am UTC](https://forum.inductiveautomation.com/t/report-csv/12503/6 "2017-04-07T10:13:40Z")

</div>

[quote=“PGriffith”]If your end goal is CSV data, it would probably be a lot better to write to the CSV directly, rather than rely on the report modules ability to save datasets. A gateway timer script, or even a tag event script trigger by a transaction group (giving you precise scheduling) would be a good option to run a single gateway event that queries the history, then saves it to a file.

The main functions you’ll need are:  
[docs.inductiveautomation.com/di … TagHistory](https://docs.inductiveautomation.com/display/DOC79/system.tag.queryTagHistory)  
[docs.inductiveautomation.com/di … aset.toCSV](https://docs.inductiveautomation.com/display/DOC79/system.dataset.toCSV)  
[docs.inductiveautomation.com/di … .writeFile](https://docs.inductiveautomation.com/display/DOC79/system.file.writeFile)[/quote]

Hi, I’m using a reporting module. A dataset doesn’t works.
