posted 9 years ago
Hello,
I am relatviely new to Groovy and the concept of closures. I am working on a report which displays query results in a table structure.
I am using a closure to iterate over the row values in order to return the results, but it only returns results for the first days value, leaving the other values blank, which I know to contain data from looking at the database. The code which does this is as follows:
To explain the code, I am passing the start and end dates and the report metric name as variables, which all work.
These are passed into the above query. I am returning the report date and values from this query. Then I am using the closure to iterate over each row and put a title of "Day1" etc. + the values from those rows into the map. From here the map is added to a table to dispaly. The table only return values for the 1st day, leaving the rest blank. So it appears the closure is not iterating the row.values properly.
Any help with this would be very much appreciated.