fix: replace Combined/CategoryResultSets with computed HeaderRows

This commit is contained in:
hplattner 2012-04-03 15:20:59 +02:00
parent 6b99765ccf
commit 86e25111b5
2 changed files with 2 additions and 18 deletions

View file

@ -202,13 +202,4 @@ class SubReportField(Field):
def getValue(self, row):
ri = self.getReportInstance(row)
return ri.getResults()
def getCategoryValue(self, row):
ri = self.getReportInstance(row)
return ri.getCategories()
def getCombinedValue(self, row):
ri = self.getReportInstance(row)
return ri.getCombinedResults()

View file

@ -77,6 +77,7 @@ class ReportInstance(BaseReport):
adapts(IReport)
rowFactory = Row
headerRowFactory = Row
view = None # set upon creation
@ -102,16 +103,8 @@ class ReportInstance(BaseReport):
result = list(self.selectObjects(parts)) # may modify parts
qc = CompoundQueryCriteria(parts)
return ResultSet(self, result, rowFactory=self.rowFactory,
headerRowFactory=self.headerRowFactory,
sortCriteria=self.getSortCriteria(), queryCriteria=qc)
def getCategories(self):
result = list(self.selectObjects(None))
return ResultSet(self, result, rowFactory=self.categoryRowFactory,
filterDublicate=True)
def getCombinedResults(self):
return CombinedResultSet(self, self.getCategories(), self.getResults())
def selectObjects(self, parts):
# to be implemented by subclass