When being used as part of the ARDI Reporting Engine, you can use a decorator to set up your report.
To begin, you would…
import ardi.util.mplreport
@mplreport.ardireport("Sample Report")
def CreateReport(report,args):
#Your Report Code Goes Here
report.Save()
The '@mplreport.ardireport' decorator takes the name of the report as a parameter.
After the decorator is the function that is called when the report needs to be created. The first parameter is an mplreport object, and the second is an object containing all of the arguments to your report.
Next, we can add a page to our report.