From: Brian M. <br...@gr...> - 2012-05-30 19:26:53
|
>I am working on error 5733 and I was wondering: > >All reports have __init__, begin_report, write_report methods. Is there a document or specification for what happens before, in between, and after these methods? I don't know of any documentation for the Report interface. There is some limited documentation for the generators, though: http://www.gramps-project.org/wiki/index.php?title=Report_API http://www.gramps-project.org/wiki/index.php?title=Report_Generation Based on your description in the issue tracker, it looks like you have a pretty good understanding of how it works. The code isn't too difficult to follow where it gets used: https://gramps.svn.sourceforge.net/svnroot/gramps/trunk/src/cli/plug/__init__.py MyReport = report_class(database, clr.option_class, cli.user.User()) MyReport.doc.init() MyReport.begin_report() MyReport.write_report() MyReport.end_report() and https://gramps.svn.sourceforge.net/svnroot/gramps/trunk/src/gui/plug/report/_reportdialog.py MyReport = report_class(dialog.db, dialog.options, user) MyReport.doc.init() MyReport.begin_report() MyReport.write_report() MyReport.end_report() Seems pretty straight forward. There is a little bit hidden under the hood by inheriting from the Report() class: https://gramps.svn.sourceforge.net/svnroot/gramps/trunk/src/gen/plug/report/_reportbase.py ~Brian |