I added a new feature, getrows, for use with additionalbands. Just declare a band like this:
1 2 3 | Band([ # ... elements ... ], getrows = rowfunction) |
where rowfunction (or whatever you’ve decided to call it) is defined like this:
1 2 3 4 | def rowfunction(row): return [ # ... row objects, i.e. dicts or lists ... ] |
If getrows is supplied, it will be called each time the Band is generated, receiving the current data source row as its only parameter. The row function must return a sequence of row-like objects, i.e. dicts or lists; the Band will then be generated once for each of these rows, instead of being generated with the parent data source row. This allows a kind of light-weight subreporting. Because these are additionalbands, they are not attached to the parent band and can flow from page to page automatically.