Before going into details, it is useful to note that the report should have two basic parts. This is explained on the [[Addons development]] page, that the source code goes into two different files:
source code file (''*.py'') e.g.: <code>report.py</code># and a Gramps Plugin Registration (''* .gpr.py'') file e.g.: <code>report .gpr.py</code>
;Report class : This is the code that takes data from the Gramps database and organizes it into the document structure. This structure can later be printed, viewed, or written into a file in a variety of formats. This class uses the [https://gramps-project.org/docs/gen/gen_plug.html#module-gen.plug._docgenplugin docgen] interface to abstract away the output format details.
;Options class : This is the code that provides means to obtain options necessary for the report using a variety of available mechanisms.
A report can potentially be generated as a standalone report, as a Gramps Book item, and as a command line report. The registration determines which modes are enabled for a given report. The report class does not have to know anything about the mode. The options class is there to provide options interface for all available modes.