# Report script data source

**URL:** <https://forum.inductiveautomation.com/t/report-script-data-source/107077>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 5, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/report-script-data-source/107077 "2025-06-05T13:05:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.fc18](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@stefan.fc18](https://forum.inductiveautomation.com/u/stefan.fc18)\
**Post date:** [June 5, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/report-script-data-source/107077/1 "2025-06-05T13:05:39Z")

</div>

Hello,  
In reporting module, I have the following parameters: StartDate, EndDate and TagPath.  
I am trying to use a script data source to call function system.tag.queryTagHistory(data[TagPath],StartDate,EndDate), but in report designer, this dataset has None and timestamp keys, and so, nothing returns to the report. Am i missing something?  
Thank you!

---

<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:** [June 5, 2025, 2:44pm UTC](https://forum.inductiveautomation.com/t/report-script-data-source/107077/2 "2025-06-05T14:44:52Z")

</div>

Post the exact code you're using, as [preformatted text](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831), so we can see what you're actually doing.

---

<div class="post-metadata">

**Author:** ![stefan.fc18](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@stefan.fc18](https://forum.inductiveautomation.com/u/stefan.fc18)\
**Post date:** [June 6, 2025, 6:42am UTC](https://forum.inductiveautomation.com/t/report-script-data-source/107077/3 "2025-06-06T06:42:08Z")

</div>

hello,  
this is the script data source for the report:

```python
def updateData(data, sample):

	end = data["EndDate"]
	start = data["StartDate"]

	data["myReturn"] = system.tag.queryTagHistory([data["TagPath"]], start, end, intervalHours = 1)

```

TagPath is a report parameter. It is passed to the report in designer, same with EndDate and StartDate.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 6, 2025, 10:48am UTC](https://forum.inductiveautomation.com/t/report-script-data-source/107077/4 "2025-06-06T10:48:33Z")

</div>

Edit your default value expressions.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67d13c76af1f6837fc6240ead5a8879b6362f417.png)
