Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 14372)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 14373)
@@ -4,4 +4,6 @@
 1.4.2.dev0 (unreleased)
 =======================
+
+* Show report number (job_id) on report pdf slips.
 
 * Level report: Count and display the number of courses registered but
Index: /main/waeup.kofa/trunk/src/waeup/kofa/reports.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/reports.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/reports.py	(revision 14373)
@@ -44,5 +44,5 @@
         """not when any output was created.""")
 
-    def create_pdf():
+    def create_pdf(job_id):
         """Generate a PDF copy.
         """
@@ -190,5 +190,5 @@
         self.creation_dt = now()
 
-    def create_pdf(self):
+    def create_pdf(self, job_id):
         raise NotImplementedError()
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py	(revision 14373)
@@ -185,5 +185,5 @@
         self.data = get_students(faccode, depcode, session, level)
 
-    def create_pdf(self):
+    def create_pdf(self, job_id):
         creator = getUtility(IPDFCreator, name='landscape')
         table_data = tbl_data_to_table(self.data)
@@ -191,5 +191,6 @@
         col_widths = [1*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 1*cm,
                       6*cm, 0.8*cm, 0.8*cm, 1*cm, 2*cm]
-        pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
+        pdf_data = [Paragraph('<b>%s - Report %s</b>'
+                              % (self.creation_dt_string, job_id),
                               STYLE["Normal"]),
                     Spacer(1, 12),]
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py	(revision 14373)
@@ -143,8 +143,9 @@
         self.data = get_students(faccode, depcode, session, level)
 
-    def create_pdf(self):
+    def create_pdf(self, job_id):
         creator = getUtility(IPDFCreator)
         #col_widths = [2*cm, 4*cm, 5*cm, 0.8*cm, 0.8*cm, 0.8*cm, 6*cm, ]
-        pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
+        pdf_data = [Paragraph('<b>%s - Report %s</b>'
+                              % (self.creation_dt_string, job_id),
                               STYLE["Normal"]),
                     Spacer(1, 12),]
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 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py	(revision 14373)
@@ -200,9 +200,10 @@
         self.data = get_student_payment_stats(session, mode, level, breakdown)
 
-    def create_pdf(self):
+    def create_pdf(self, job_id):
         creator = getUtility(IPDFCreator, name='landscape')
         table_data = tbl_data_to_table(*self.data)
         col_widths = [None,] + [3.2*cm] * len(self.data[1]) + [None,]
-        pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
+        pdf_data = [Paragraph('<b>%s - Report %s</b>'
+                              % (self.creation_dt_string, job_id),
                               STYLE["Normal"]),
                     Spacer(1, 12),]
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 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py	(revision 14373)
@@ -161,9 +161,10 @@
         self.data = get_student_stats(session, mode, level, breakdown)
 
-    def create_pdf(self):
+    def create_pdf(self, job_id):
         creator = getUtility(IPDFCreator, name='landscape')
         table_data = tbl_data_to_table(*self.data)
         col_widths = [None,] + [1.6*cm] * len(self.data[1]) + [None,]
-        pdf_data = [Paragraph('<b>%s</b>' % self.creation_dt_string,
+        pdf_data = [Paragraph('<b>%s - Report %s</b>'
+                              % (self.creation_dt_string, job_id),
                               STYLE["Normal"]),
                     Spacer(1, 12),]
@@ -296,5 +297,5 @@
         self.response.setHeader(
             'Content-Disposition:', 'attachment; filename="%s' % filename)
-        pdf_stream = self.context.create_pdf()
+        pdf_stream = self.context.create_pdf(self.context.__name__)
         ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
         grok.getSite().logger.info('%s - report %s downloaded: %s' % (
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_level_report.py	(revision 14373)
@@ -63,5 +63,5 @@
         self.student['studycourse']['100']['Course3'] = ticket
         report = LevelReport('fac1', 'dep1', 2010, 100)
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'level_report.pdf')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_session_results_presentation.py	(revision 14373)
@@ -63,5 +63,5 @@
     def test_create_pdf(self):
         report = SessionResultsPresentation('fac1', 'dep1', 2010, 100)
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'session_results_presentation.pdf')
@@ -81,5 +81,5 @@
         self.student['studycourse']['620']['Course2'] = ticket
         report = SessionResultsPresentation('fac1', 'dep1', 2013, 620)
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'session_results_presentation_620.pdf')
@@ -102,5 +102,5 @@
         self.student['studycourse']['200']['Course2'] = ticket
         report = SessionResultsPresentation('fac1', 'dep1', 2010, 0)
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'session_results_presentation_erroneous.pdf')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_payment_statistics.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_payment_statistics.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_payment_statistics.py	(revision 14373)
@@ -56,5 +56,5 @@
         report = StudentPaymentStatisticsReport(
             2010, 'Undergraduate Full-Time', 0,  'faccode')
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'student_payment_statistics.pdf')
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 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/reports/tests/test_student_statistics.py	(revision 14373)
@@ -120,5 +120,5 @@
         report = StudentStatisticsReport(
             2010, 'Undergraduate Full-Time', 0, 'faccode')
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'student_statistics.pdf')
@@ -131,5 +131,5 @@
         report = StudentStatisticsReport(
             2010, 'Undergraduate Full-Time', 100, 'faccode')
-        result = report.create_pdf()
+        result = report.create_pdf('JOB_ID')
         self.assertTrue(result.startswith('%PDF-'))
         path = os.path.join(samples_dir(), 'student_statistics_100.pdf')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_reports.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_reports.py	(revision 14372)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_reports.py	(revision 14373)
@@ -72,5 +72,5 @@
         # trying to create a pdf results in an error
         report = Report()
-        self.assertRaises(NotImplementedError, report.create_pdf)
+        self.assertRaises(NotImplementedError, report.create_pdf, 'JOB_ID')
         return
 
