# \[Bug\] Issue with Reporting Data Keys

**URL:** <https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 25, 2023, 11:50pm UTC](https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026 "2023-01-25T23:50:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Barlow](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Jacob\_Barlow](https://forum.inductiveautomation.com/u/Jacob_Barlow)\
**Post date:** [January 25, 2023, 11:50pm UTC](https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026/1 "2023-01-25T23:50:31Z")

</div>

I'm not sure if this is intended behavior, but when I have data keys that start with a number, even when that number is in string format, for example:

> data["2023"] or data[key] where key = str(system.date.getYear(system.date.now()))

The data is available in the XML preview, but when used on a component everything returns as \<N/A\>

This is the script I was using, trying to make unique datasets for each year with a key that is the string value of the year:

```auto
	currentYear = system.date.getYear(system.date.now())
	startYear = system.date.getYear(system.date.getDate(2015, 11, 1))
	test = range(currentYear, startYear-1, -1)
	yearKeys = []
	for number in test:
		yearKeys.append(str(number))
	
	yearlyData = []
	
	for year in quarterLists:
		headers = ["Period", "Actual", "Budget", "Variance", "Variance Pct"]
		dataset = system.dataset.toDataSet(headers, year)
		yearlyData.append(dataset)
		
	for i in range(len(yearKeys)):
		data[yearKeys[i]] = yearlyData[i]

```

if I change the script to make the "yearKeys" start with a letter it works as expected; all the data shows up in the reporting components, etc. If this is just a limitation in the way that the reporting module allocates data keys, that's fine. I already got the workaround of just starting the key with a letter so no worries either way.

I'm using Ignition version 8.1.24, Reporting Module 6.1.24

---

<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:** [January 25, 2023, 11:51pm UTC](https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026/2 "2023-01-25T23:51:39Z")

</div>

> [@Jacob\_Barlow](#):
>
> If this is just a limitation in the way that the reporting module allocates data keys, that's fine.

Yep, that. We've considered trying to untangle that requirement from the reporting engine (you're not the first person this has happened to) but it's not a very pressing issue given the easy workaround.

---

<div class="post-metadata">

**Author:** ![Jacob\_Barlow](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Jacob\_Barlow](https://forum.inductiveautomation.com/u/Jacob_Barlow)\
**Post date:** [January 25, 2023, 11:53pm UTC](https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026/3 "2023-01-25T23:53:03Z")

</div>

Sounds good, thanks for the quick reply. I was going in circles earlier trying to troubleshoot and as soon as I went to just one key named "test" everything populated, lost my damn mind over nothing lol

---

<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:** [January 26, 2023, 12:20am UTC](https://forum.inductiveautomation.com/t/bug-issue-with-reporting-data-keys/69026/4 "2023-01-26T00:20:10Z")

</div>

Similar bad behavior happens in some contexts where datasets have column names starting with digits. Avoid that, too.
