- Timestamp:
- 10 Jul 2018, 13:55:56 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py
r14610 r15081 155 155 new_col_names = [] 156 156 for name in col_names: 157 if len(name) > 18: 158 new_col_names.append(name.replace(' ', '\n', 1)) 159 else: 160 new_col_names.append(name) 157 new_col_names.append(name.replace(' ', '\n')) 161 158 head = [''] + [col_name for col_name in new_col_names] 162 159 result = [head] … … 244 241 def create_pdf(self, job_id): 245 242 creator = getUtility(IPDFCreator, name=self.pdfcreator) 243 maxlength = len(str(self.data[2][-1][-1])) \ 244 + len(str(self.data[2][-1][-2])) \ 245 + 3 246 maxlength = max(maxlength, 10) 246 247 table_data = tbl_data_to_table(*self.data) 247 col_widths = [None,] + [ 3.2*cm] * len(self.data[1]) + [None,]248 col_widths = [None,] + [.17*cm*maxlength] * len(self.data[1]) + [None,] 248 249 pdf_data = [Paragraph('<b>%s - Report %s</b>' 249 250 % (self.creation_dt_string, job_id),
Note: See TracChangeset for help on using the changeset viewer.