Report Best Way To Display Script Data

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.

[['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?

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


Thanks for the nudge

1 Like

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

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?

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

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.