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()
|
style = TableCellStyle()
|
||||||
cssClass = ''
|
cssClass = ''
|
||||||
totals = []
|
totals = []
|
||||||
|
groupHeaderColspan = None
|
||||||
|
groupHeaderHidden = False
|
||||||
|
|
||||||
executionSteps = ['query', 'sort', 'output'] # , 'totals']
|
executionSteps = ['query', 'sort', 'output'] # , 'totals']
|
||||||
|
|
||||||
|
@ -128,7 +130,6 @@ class Field(Component):
|
||||||
# TODO: consider 'descending' flag
|
# TODO: consider 'descending' flag
|
||||||
return self.getValue(row)
|
return self.getValue(row)
|
||||||
|
|
||||||
|
|
||||||
class CalculatedField(Field):
|
class CalculatedField(Field):
|
||||||
|
|
||||||
def getRawValue(self, row):
|
def getRawValue(self, row):
|
||||||
|
|
|
@ -125,6 +125,14 @@ class ResultSet(object):
|
||||||
headerColumn.__name__ = c.output
|
headerColumn.__name__ = c.output
|
||||||
headerColumn.cssClass = c.cssClass
|
headerColumn.cssClass = c.cssClass
|
||||||
headerRow.headerColumns.append(headerColumn)
|
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
|
return headerRow
|
||||||
|
|
||||||
def getSubTotalsRow(self, gf, row, columns, values):
|
def getSubTotalsRow(self, gf, row, columns, values):
|
||||||
|
|
Loading…
Add table
Reference in a new issue