Index: main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py	(revision 12614)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py	(revision 12619)
@@ -59,13 +59,17 @@
         codes = tuple(sorted([x for x in site['faculties'].keys()],
                                  key=lambda x: x.lower()))
+        paths = codes
     elif breakdown == 'depcode':
         faculties = site['faculties']
         depcodes = []
+        deppaths = []
         for fac in faculties.values():
             for dep in fac.values():
                 depcodes.append(dep.code)
+                deppaths.append('%s/%s' % (fac.code, dep.code))
         codes = tuple(sorted([x for x in depcodes],
                                  key=lambda x: x.lower()))
-    codes = codes + (u'Total',)
+        paths = tuple(sorted([x for x in deppaths],
+                                 key=lambda x: x.lower()))
     # XXX: Here we do _one_ query and then examine the single
     #   students. One could also do multiple queries and just look for
@@ -74,5 +78,5 @@
     cat = queryUtility(ICatalog, name="students_catalog")
     result = cat.searchResults(current_session=(session, session))
-    table = [[0 for x in xrange(2*len(payment_cats))] for y in xrange(len(codes))]
+    table = [[0 for x in xrange(2*len(payment_cats))] for y in xrange(len(codes)+1)]
     mode_groups = getUtility(IKofaUtils).MODE_GROUPS
     for stud in result:
@@ -115,5 +119,7 @@
     # Turn lists into tuples
     table = tuple([tuple(row) for row in table])
-    return (codes, table_header, table)
+
+    paths = paths + (u'Total',)
+    return (paths, table_header, table)
 
 from reportlab.lib import colors
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py	(revision 12614)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py	(revision 12619)
@@ -57,13 +57,17 @@
         codes = tuple(sorted([x for x in site['faculties'].keys()],
                                  key=lambda x: x.lower()))
+        paths = codes
     elif breakdown == 'depcode':
         faculties = site['faculties']
         depcodes = []
+        deppaths = []
         for fac in faculties.values():
             for dep in fac.values():
                 depcodes.append(dep.code)
+                deppaths.append('%s/%s' % (fac.code, dep.code))
         codes = tuple(sorted([x for x in depcodes],
                                  key=lambda x: x.lower()))
-    codes = codes + (u'Total',)
+        paths = tuple(sorted([x for x in deppaths],
+                                 key=lambda x: x.lower()))
     # XXX: Here we do _one_ query and then examine the single
     #   students. One could also do multiple queries and just look for
@@ -72,5 +76,5 @@
     cat = queryUtility(ICatalog, name="students_catalog")
     result = cat.searchResults(current_session=(session, session))
-    table = [[0 for x in xrange(len(states))] for y in xrange(len(codes))]
+    table = [[0 for x in xrange(len(states))] for y in xrange(len(codes)+1)]
     mode_groups = getUtility(IKofaUtils).MODE_GROUPS
     for stud in result:
@@ -88,5 +92,7 @@
     # turn lists into tuples
     table = tuple([tuple(row) for row in table])
-    return (codes, states, table)
+
+    paths = paths + (u'Total',)
+    return (paths, states, table)
 
 from reportlab.lib import colors
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py	(revision 12614)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py	(revision 12619)
@@ -76,5 +76,5 @@
         self.assertEqual(
             result1,
-            ((u'dep1', u'dep2', u'Total'),
+            ((u'fac1/dep1', u'fac2/dep2', u'Total'),
              self.states,
              ((1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1),
@@ -83,5 +83,5 @@
         self.assertEqual(
             result2,
-            ((u'dep1', u'dep2', u'Total'),
+            ((u'fac1/dep1', u'fac2/dep2', u'Total'),
              self.states,
              ((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
