diff --git a/expert/field.py b/expert/field.py index 3f2a87d..8b0d6f8 100644 --- a/expert/field.py +++ b/expert/field.py @@ -202,4 +202,8 @@ class SubReportField(Field): def getValue(self, row): ri = self.getReportInstance(row) return ri.getResults() + + def getCategoryValue(self, row): + ri = self.getReportInstance(row) + return ri.getCategoryResults() \ No newline at end of file diff --git a/expert/report.py b/expert/report.py index c89a2cd..e12bec2 100644 --- a/expert/report.py +++ b/expert/report.py @@ -103,6 +103,11 @@ class ReportInstance(BaseReport): qc = CompoundQueryCriteria(parts) return ResultSet(self, result, rowFactory=self.rowFactory, sortCriteria=self.getSortCriteria(), queryCriteria=qc) + + def getCategoryResults(self): + result = list(self.selectObjects(None)) + return ResultSet(self, result, rowFactory=self.categoryRowFactory, + filterDublicate=True) def selectObjects(self, parts): # to be implemented by subclass