Changes

Jump to: navigation, search

Report-writing tutorial

2 bytes added, 03:36, 13 February 2013
m
Report class: http://pythonhosted.org/Gramps/gen/gen_plug.html#module-gen.plug._docgenplugin
;self.doc : The opened document instance ready for output. This is of the type [http://packages.python.org/Gramps/gen/gen_plug.html#module-gen.plug._docgenplugin docgen], and is '''not''' a normal file object.
;self.database : The [http://www.gramps-project.org/docs/gen/gen_lib.html#module-gen.lib GrampsDbBase] database object.
;self.options_class : The [http://packages.pythonpythonhosted.org/Gramps/gen/gen_plug.html#module-gen.plug._options _docgenplugin ReportOptions] class passed to the report.
You'll probably need a start-person for which to write the report. This person should be obtained from the <tt>options_class</tt> object through the PersonOption class which will default to the active person in the database. Anything else the report class needs in order to produce the report should be obtained from the <tt>options_class</tt> object. For example, you may need to include the additional code in the report class constructor to obtain any options you defined for the report.

Navigation menu