# Report Tables query

**URL:** <https://forum.inductiveautomation.com/t/report-tables-query/18427>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 12, 2018, 5:12pm UTC](https://forum.inductiveautomation.com/t/report-tables-query/18427 "2018-06-12T17:12:53Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![harryzhou4498](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@harryzhou4498](https://forum.inductiveautomation.com/u/harryzhou4498)\
**Post date:** [June 13, 2018, 2:24pm UTC](https://forum.inductiveautomation.com/t/report-tables-query/18427/21 "2018-06-13T14:24:31Z")

</div>

How would I do that for my data source?

---

<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:** [June 13, 2018, 3:10pm UTC](https://forum.inductiveautomation.com/t/report-tables-query/18427/22 "2018-06-13T15:10:09Z")

</div>

You bring your raw data in as you are now, or possibly unaggregated. Then you add a [script data source](https://docs.inductiveautomation.com/display/DOC79/Scripting+Data+Source) with a script that will read the above dataset row by row, applying your rules, and inserting a new dataset into the report’s list of keys.  
If you need to produce a nested data source, see [this forum topic](http://forum.inductiveautomation.com/t/report-with-scripted-nested-data/11801), too.

[Previous page](https://forum.inductiveautomation.com/t/report-tables-query/18427.md?page=1)
