The class defining a PrintedReport.
Whenever you make a new printed report you will have to define a new class that inherits from this report.
Name of the file where this report is defined (e.g., Operational if the file is Operational.py)
Filename alphanumeric, underscore, and hyphen are ok
A list of file formats to use, e.g., [‘pdf’,’html’,’xls’]
You should implement the generate method in a report subclass. This method creates the report and saves it to the right place (probably static/reports/filename.format). The return value is ignored.
Call this to update the progress of the report in the database.
Parameters: | progress (float) – A number from 0 to 100 giving the percentage completion. |
---|
Use this method to test your reports from the shell.
Parameters: |
|
---|
Human-readable title of report
A list of report variants in the form:
(title_suffix, fn_suffix, variant_data)
For example, you might have a patient register for Bugongi and Ruhiira health centers:
variants = [
(' Bugongi HC', '_BG', {'clinic_id': 13}),
(' Ruhiira HC', '_RH', {'clinic_id': 15}),
]
Neither the title nor filename suffixes can be the empty string “”