add groupHeaderColspan to groupHeaderRows
This commit is contained in:
parent
e05ccdc96f
commit
41e143bcec
2 changed files with 10 additions and 1 deletions
|
@ -82,6 +82,8 @@ class Field(Component):
|
|||
style = TableCellStyle()
|
||||
cssClass = ''
|
||||
totals = []
|
||||
groupHeaderColspan = None
|
||||
groupHeaderHidden = False
|
||||
|
||||
executionSteps = ['query', 'sort', 'output'] # , 'totals']
|
||||
|
||||
|
@ -128,7 +130,6 @@ class Field(Component):
|
|||
# TODO: consider 'descending' flag
|
||||
return self.getValue(row)
|
||||
|
||||
|
||||
class CalculatedField(Field):
|
||||
|
||||
def getRawValue(self, row):
|
||||
|
|
|
@ -125,6 +125,14 @@ class ResultSet(object):
|
|||
headerColumn.__name__ = c.output
|
||||
headerColumn.cssClass = c.cssClass
|
||||
headerRow.headerColumns.append(headerColumn)
|
||||
if headerColumn.groupHeaderColspan is not None:
|
||||
colNames = [col.name for col in self.displayedColumns]
|
||||
nextColumns = [col for col in self.displayedColumns
|
||||
if colNames.index(col.name) > colNames.index(c.output)]
|
||||
for i in range(headerColumn.groupHeaderColspan - 1):
|
||||
nextColumn = copy(nextColumns[i])
|
||||
nextColumn.groupHeaderHidden = True
|
||||
headerRow.headerColumns.append(nextColumn)
|
||||
return headerRow
|
||||
|
||||
def getSubTotalsRow(self, gf, row, columns, values):
|
||||
|
|
Loading…
Add table
Reference in a new issue