Modules¶
highcharts¶
export_pdf¶
-
reports_creator.export_pdf.render_to_pdf(report, template_src, context_dict, pdf_encoding='UTF-8')¶ Render the report results to pdf format.
Keyword arguments: report – a report instance template_src – template file path context_dict – context dictionary pdf_encoding – encoding to render string
report¶
utils¶
-
class
reports_creator.utils.ReportRow¶ Class to represent report rows
Attributes:
is_total- defined as True if row is a group total row or report total rowis_caption- TODO
-
get_css_class()¶ Render css classes to this row into html representation
-
is_value()¶ Evaluate True if the row is a normal row or not
-
class
reports_creator.utils.ReportValue(value)¶ Class to represent cells values for report rows
Attributes:
value- real value from databaseis_report_total- defined as True if value is for showing in report total rowis_group_total- defined as True if value is for showing in group total rowis_value- defined as True if value is for showing in normal row
-
format(value, instance)¶ Format the value instance.
-
text()¶ Render as text the value. This function also format the value.
-
reports_creator.utils.avg_column(values)¶ Average values for any column
-
reports_creator.utils.base_label(report, field)¶ Basic label
-
reports_creator.utils.count_column(values)¶ Count values for any column
-
reports_creator.utils.date_format(value, instance)¶ Format cell value to friendly date string
-
reports_creator.utils.round_format(value, instance)¶ Format value to render with 2 decimal places
-
reports_creator.utils.sum_column(values)¶ Sum values for any column
-
reports_creator.utils.usd_format(value, instance)¶ Format cell value to money
-
reports_creator.utils.yesno_format(value, instance)¶ Format boolean value to render Yes or No if True or False