Index: main/waeup.aaue/trunk/src/waeup/aaue/students/reports/browser_templates/studentlevelstatisticsreportgeneratorpage.pt
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/browser_templates/studentlevelstatisticsreportgeneratorpage.pt	(revision 13869)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/reports/browser_templates/studentlevelstatisticsreportgeneratorpage.pt	(revision 13870)
@@ -10,4 +10,15 @@
     <select name="breakdown" class="form-control half">
       <span tal:repeat="items view/breakdowns" tal:omit-tag="">
+        <option
+            tal:define="name python: items[1]; title python: items[0]"
+            tal:attributes="value name">
+          <span tal:replace="title">TITLE</span>
+        </option>
+      </span>
+    </select>
+  <br />
+  <label for="session" i18n:translate="">Study Modes Group</label>
+    <select name="mode" class="form-control half">
+      <span tal:repeat="items view/modes" tal:omit-tag="">
         <option
             tal:define="name python: items[1]; title python: items[0]"
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/reports/student_level_statistics.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/student_level_statistics.py	(revision 13869)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/reports/student_level_statistics.py	(revision 13870)
@@ -34,7 +34,8 @@
     session = Attribute('Session to report')
     creation_dt_string = Attribute('Human readable report creation datetime')
-
-def get_student_stats(session, breakdown):
-    """Get students in a certain session.
+    mode = Attribute('Study modes group to report')
+
+def get_student_stats(session, mode, breakdown):
+    """Get students in a certain session and study mode.
 
     Returns a table ordered by code (faculty or department, one per row) and
@@ -74,5 +75,8 @@
     result = cat.searchResults(current_session=(session, session))
     table = [[0 for x in xrange(2 * len(levels) + 2)] for y in xrange(len(paths)+1)]
+    mode_groups = getUtility(IKofaUtils).MODE_GROUPS
     for stud in result:
+        if mode != 'All' and stud.current_mode not in mode_groups[mode]:
+            continue
         if getattr(stud, breakdown) is None:
             continue
@@ -155,8 +159,9 @@
     data = None
     session = None
-
-    def __init__(self, session, breakdown, author='System'):
+    mode = None
+
+    def __init__(self, session, mode, breakdown, author='System'):
         super(StudentLevelStatisticsReport, self).__init__(
-            args=[session, breakdown], kwargs={'author':author})
+            args=[session, mode, breakdown], kwargs={'author':author})
         self.studylevelsource = StudyLevelSource().factory
         self.portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
@@ -164,7 +169,8 @@
         self.breakdown = breakdown
         self.author = author
+        self.mode = mode
         self.creation_dt_string = self.creation_dt.astimezone(
             getUtility(IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z")
-        self.data = get_student_stats(session, breakdown)
+        self.data = get_student_stats(session, mode, breakdown)
 
     def create_pdf(self):
@@ -178,6 +184,6 @@
             Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
         doc_title = translate(
-            _('Students - ${c}',
-            mapping = {'c':self.session}))
+            _('${a} Students - ${c}',
+            mapping = {'a':self.mode, 'c':self.session}))
         pdf = creator.create_pdf(
             pdf_data, None, doc_title, self.author, doc_title + '-'
@@ -192,8 +198,8 @@
 
     def generate(
-        self, site, session=None, 
+        self, site, session=None, mode=None,
         breakdown=None, author=None):
         result = StudentLevelStatisticsReport(
-            session=session,
+            session=session, mode=mode,
             breakdown=breakdown, author=author)
         return result
@@ -224,7 +230,8 @@
 
     def update(
-        self, CREATE=None, session=None, breakdown=None):
+        self, CREATE=None, session=None, mode=None, breakdown=None):
         self.parent_url = self.url(self.context.__parent__)
         self._set_session_values()
+        self._set_mode_values()
         self._set_breakdown_values()
         if CREATE and session:
@@ -234,4 +241,5 @@
             kw = dict(
                 session=int(session),
+                mode=mode,
                 breakdown=breakdown)
             self.flash(_('New report is being created in background'))
@@ -240,7 +248,7 @@
             ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
             grok.getSite().logger.info(
-                '%s - report %s created: %s (session=%s, breakdown=%s)' % (
+                '%s - report %s created: %s (session=%s, mode=%s, breakdown=%s)' % (
                 ob_class, job_id, self.context.title,
-                session, breakdown))
+                session, mode, breakdown))
             self.redirect(self.parent_url)
             return
@@ -250,4 +258,9 @@
         vocab_terms = academic_sessions_vocab.by_value.values()
         self.sessions = [(x.title, x.token) for x in vocab_terms]
+        return
+
+    def _set_mode_values(self):
+        mode_groups = getUtility(IKofaUtils).MODE_GROUPS
+        self.modes = sorted([(key, key) for key in mode_groups.keys()])
         return
 
@@ -264,6 +277,6 @@
 
     def _filename(self):
-        return 'StudentLevelStatisticsReport_%s_%s.pdf' % (
-            self.context.session,
+        return 'StudentLevelStatisticsReport_%s_%s_%s.pdf' % (
+            self.context.session, self.context.mode,
             self.context.creation_dt_string)
 
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_student_level_statistics.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_student_level_statistics.py	(revision 13869)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_student_level_statistics.py	(revision 13870)
@@ -23,5 +23,5 @@
     def test_iface(self):
         # ensure we fullfill interface contracts
-        obj = StudentLevelStatisticsReport(2010, 'faccode')
+        obj = StudentLevelStatisticsReport(2010, 'Undergraduate Full-Time', 'faccode')
         verifyClass(IStudentLevelStatisticsReport, StudentLevelStatisticsReport)
         verifyObject(IStudentLevelStatisticsReport, obj)
@@ -32,6 +32,6 @@
         self.student.sex = 'm'
         # we can get a table with one student
-        result1 = get_student_stats(2010, 'faccode')
-        result2 = get_student_stats(2009, 'faccode')
+        result1 = get_student_stats(2010, 'Undergraduate Full-Time', 'faccode')
+        result2 = get_student_stats(2009, 'Undergraduate Full-Time', 'faccode')
         self.assertEqual(
             result1,
@@ -54,6 +54,6 @@
         self.create_cert(u'fac2', u'dep2', u'CERT2')
         self.student.sex = 'm'
-        result1 = get_student_stats(2010, 'faccode')
-        result2 = get_student_stats(2009, 'faccode')
+        result1 = get_student_stats(2010, 'Undergraduate Full-Time', 'faccode')
+        result2 = get_student_stats(2009, 'Undergraduate Full-Time', 'faccode')
         self.assertEqual(
             result1,
@@ -78,6 +78,6 @@
         self.create_cert(u'fac2', u'dep2', u'CERT2')
         self.student.sex = 'm'
-        result1 = get_student_stats(2010, 'depcode')
-        result2 = get_student_stats(2009, 'depcode')
+        result1 = get_student_stats(2010, 'Undergraduate Full-Time', 'depcode')
+        result2 = get_student_stats(2009, 'Undergraduate Full-Time', 'depcode')
         self.assertEqual(
             result1,
@@ -102,5 +102,5 @@
         self.create_cert(u'FAC2', u'dept2', u'CERT2')
         self.student['studycourse'].current_level = 220
-        report = StudentLevelStatisticsReport(2010, 'depcode')
+        report = StudentLevelStatisticsReport(2010, 'Undergraduate Full-Time', 'depcode')
         result = report.create_pdf()
         self.assertTrue(result.startswith('%PDF-'))
Index: main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py	(revision 13869)
+++ main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py	(revision 13870)
@@ -152,2 +152,11 @@
         'cl_regular': 'Acceptance Fee - Regular Students',
         }
+
+    MODE_GROUPS = {
+        'All': ('all',),
+        'Undergraduate Full-Time': ('ug_ft', 'mde_ft', 'mug_ft', 'de_ft'),
+        'Undergraduate Part-Time': ('ug_pt', 'de_pt'),
+        'Postgraduate': ('pg_ft','special_pg_ft', 'special_pg_pt'),
+        'Foundation Programme': ('found',),
+        'Institute of Education': ('dp_ft'),
+        }
