# Report Best Way To Display Script Data

**URL:** <https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [October 21, 2023, 5:03pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805 "2023-10-21T17:03:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 21, 2023, 5:03pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/1 "2023-10-21T17:03:51Z")

</div>

I have some test data that I was going to throw into a report. Currently the data is presented as a list of lists and is basically a name for the results and the results dataset.

```auto
[['Results Name #1', Dataset [3R ⅹ 3C]], ['Results Name #2', Dataset [13R ⅹ 3C]]]

```

All I really want is to display the name and the data underneath and repeat for as many times as the length of the list.

Is this doable? If so, how would the data keys look?

---

<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:** [October 21, 2023, 5:18pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/2 "2023-10-21T17:18:26Z")

</div>

You will want to reprocess into a properly nested structure to drive a table group. See this old topic for inspiration:

> [@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…

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 21, 2023, 5:56pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/3 "2023-10-21T17:56:35Z")

</div>

Thanks for the nudge

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 21, 2023, 10:08pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/4 "2023-10-21T22:08:05Z")

</div>

Got everything working except getting an error in the report, "unable to convert row x, column x to type class java.sql.Timestamp"

```auto
from com.inductiveautomation.ignition.common.util import DatasetBuilder
from java.lang import String, Integer, Long, Boolean, Float
from java.util import Date

b = DatasetBuilder.newBuilder().colNames("path", "value", "timestamp").colTypes(String, String, Date) 

```

All rows for column are `java.util.Date`. The only way I could get past the error was changing from `Date` to `String`. I guess it's no big deal, but for my benefit any idea what's going on here?

---

<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:** [October 21, 2023, 10:29pm UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/5 "2023-10-21T22:29:44Z")

</div>

Not sure. java.sql.Timestamp is a subclass of java.util.Date, so should be compatible. Share more data?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 22, 2023, 7:33am UTC](https://forum.inductiveautomation.com/t/report-best-way-to-display-script-data/80805/6 "2023-10-22T07:33:46Z")

</div>

Oh. I spent some time trying to figure out exactly what data structure was expected by table groups… and ended up just nesting queries that shouldn’t be, just for the sake of getting what the table expects.  
I’ll revisit that part of the report and see if it can be simplified with this.
