I am attempting to make a report that would show production data by month, date, and eventually shift. However, I am encountering a strange issue using the Reporting Table Groups. I am using the following script to generate my 2 datasets.
def updateData(data, sample):
#data['myKey']='Example'
start = data['StartDate']
end = data['EndDate']
monthsBetween = system.date.monthsBetween(start, end)
header = ['ts']
monthsDS = []
dayHeader = ['t_stamp']
daysDS = []
for i in range(monthsBetween):
monthToProcess = system.date.addMonths(start, i)
monthsDS.append([monthToProcess])
daysBetween = system.date.daysBetween(monthToProcess, system.date.addMonths(monthToProcess, 1))
for j in range(daysBetween):
dayToProcess = system.date.addDays(monthToProcess, j)
daysDS.append([dayToProcess])
data['MonthsDS'] = system.dataset.toDataSet(header, monthsDS)
data['DaysDS'] = system.dataset.toDataSet(dayHeader, daysDS)
When I preview the Report, everything looks correct in the sample data browser and the days are incrementing.
However, in the table, it simply lists the same date over and over.
Is there something about the table grouping that I am missing?