Esempio n. 1
0
def report(request):
    report = Report()
    report.build()
    report.save('/tmp/aircraft.xls')
    return HttpResponse(open('/tmp/aircraft.xls').read(),
                        mimetype='application/vnd.ms-excel')
Esempio n. 2
0
def report(request):
    report = Report()
    report.build()
    report.save('/tmp/aircraft.xls')
    return HttpResponse(open('/tmp/aircraft.xls').read(), mimetype='application/vnd.ms-excel')
Esempio n. 3
0
    report.add_text(text='Redmine',
                    header=1,
                    space_after=0.05)
    report.add_text(text=REPORT_MESSAGES['resource_info'][LANG].format(rmman.from_date, rmman.to_date),
                    space_after=0.2)
    report.add_text(text=REPORT_MESSAGES['project_spent_time'][LANG],
                    space_after=0.2)

    for project in rmman.projects:
        table = rmman.gen_report_table(label=project.name,
                                       dictionary=project.time_entries)
        report.add_table(table)
        report.add_space()

    report.add_space()
    report.add_text(REPORT_MESSAGES['root_issues_spent_time'][LANG],
                    space_after=0.05)

    rmman.get_issues()
    for project in rmman.projects:
        report.add_text(text=REPORT_MESSAGES['project'][LANG] + ' ' + project.name,
                        header=2,
                        space_after=0.1)
        for issue_table in project.issue_tables_gen:
            report.add_header(issue_table[0])  # Issue subject used as a header
            report.add_table(issue_table[1])  # Data table
            report.add_space()

    report.build()
    print('Report generated.')