Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino.utils.report

Classes

EmptyTable(*args, **kw)

A "Table" that has exactly one virtual row and thus is visible only using a Detail view on that row.

EmptyTableRow(table, **kw)

Base class for virtual rows of an EmptyTable.

Report(*args, **kw)

A special kind of EmptyTable used to create "reports".

class lino.utils.report.EmptyTableRow(table, **kw)

Bases: VirtualRow, Printable

Base class for virtual rows of an EmptyTable. An EmptyTableRow instance

get_print_templates(*args)

Overrides lino.modlib.printing.mixins.Printable.get_print_templates()

class lino.utils.report.EmptyTable(*args, **kw)

Bases: Frame

A “Table” that has exactly one virtual row and thus is visible only using a Detail view on that row.

Subclassed by lino.modlib.about.About and Report.

classmethod get_print_templates(bm, action)

Called from EmptyTableRow.

class lino.utils.report.Report(*args, **kw)

Bases: EmptyTable

A special kind of EmptyTable used to create “reports”. A report is a series of headings, paragraphs and tables combined into a single printable and previewable document.

When subclassing this, application code must either define report_items or implement an alternative get_story().

Usage examples: lino_xl.lib.courses.StatusReport lino_welfare.modlib.integ.ActivityReport

Note that there is also lino.modlib.users.UserPlan and lino.mixins.Story for more expensive “reports” where you use cached data lino_xl.lib.sheets.Report.

report_items = None
classmethod get_story(self, ar)

Yield a sequence of story items. Every item can be (1) an ElementTree element or (2) a table or (3) an action request.