# What is the proper way to format query data for Report Tables?

**URL:** <https://forum.inductiveautomation.com/t/what-is-the-proper-way-to-format-query-data-for-report-tables/110251>\
**Category:** Ignition\
**Tags:** reporting\
**Created:** [August 28, 2025, 7:22pm UTC](https://forum.inductiveautomation.com/t/what-is-the-proper-way-to-format-query-data-for-report-tables/110251 "2025-08-28T19:22:37Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [September 2, 2025, 1:27pm UTC](https://forum.inductiveautomation.com/t/what-is-the-proper-way-to-format-query-data-for-report-tables/110251/9 "2025-09-02T13:27:24Z")

</div>

If there are DB performance reasons to collect all the chart data in one query, consider constructing the required nesting in a script data source. Like so:

> [@Report with Scripted Nested Data](https://forum.inductiveautomation.com/t/report-with-scripted-nested-data/11801):
>
> The report datasource scripting examples explain how to access the nested data in another key for use constructing a custom dataset. What I don’t see is how to construct nested data that would be suitable for use with a child table in a table group. I have a parent dataset that I’m constructing via script due to annoying limitations of an ancient SQL Server 2000 instance. I need a subquery for each row that could be done with a normal query, but there’s no way to add a regular subquery to a s…

---

_[View the full topic](https://forum.inductiveautomation.com/t/what-is-the-proper-way-to-format-query-data-for-report-tables/110251)._
