# Script Datasource - Reading Tag Historian Query results in Reporting Module 6.1.25

**URL:** <https://forum.inductiveautomation.com/t/script-datasource-reading-tag-historian-query-results-in-reporting-module-6-1-25/116242>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [July 2, 2026, 3:01am UTC](https://forum.inductiveautomation.com/t/script-datasource-reading-tag-historian-query-results-in-reporting-module-6-1-25/116242 "2026-07-02T03:01:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [July 2, 2026, 4:08am UTC](https://forum.inductiveautomation.com/t/script-datasource-reading-tag-historian-query-results-in-reporting-module-6-1-25/116242/2 "2026-07-02T04:08:36Z")

</div>

> **[Query-Based Data Sources​ - Scripting Data Source | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/reporting/report-data/scripting-data-source#query-based-data-sources)**
>
> The Script data source allows you to use scripting to add data into a report, or modify existing data. With this data source, you can pull in data from the database and then modify it using a script before pushing it out as a data key for use in the...

`getCoreResults` Is the correct method to access the results of a query type parameter in reporting.

Based on the fact that your table is showing as empty in preview, I would say that your tag history query is returning no rows. `getRowCount()` returning 0 would support with this.

Double check the parameter values being fed to the tag history query. Are you defining valid start/end times to the query? Is there actually data for the time span you are querying? Are you correctly feeding the parameter values to the query?

Also, post code as preformatted text to make it easier for others to review, please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

_[View the full topic](https://forum.inductiveautomation.com/t/script-datasource-reading-tag-historian-query-results-in-reporting-module-6-1-25/116242)._
