web2py-appreport icon indicating copy to clipboard operation
web2py-appreport copied to clipboard

PluginAppreport instance has no attribute '_get_report_instance'

Open rahulserver opened this issue 8 years ago • 1 comments

The REPORTPYFPDF does not work and following example on wiki page:

#app_root/controllers/your_controller.py
def static_report_pyfpdf():
    static_html = '<html><body><h1>My first report</h1><table><tr><td>Hello world :P </td></tr><tr><td>using <strong>web2py-appreport</strong> with pyfpdf engine</td></tr><table></body></html>'
    return plugin_appreport.REPORTPYFPDF(html=static_html, title = 'My report title')

Gives this error:

PluginAppreport instance has no attribute '_get_report_instance'

On further debugging, its this line in plugin_appreport.py (line no.109 according to my pycharm debugger) thats giving the error: pdf_builder = plugin_appreport_module.libs.appreport.pdf_builder.PdfBuilderPyfpdf(report = self._get_report_instance(kargs))

rahulserver avatar Jan 13 '17 04:01 rahulserver

Hey @rahulserver

Probably the _get_report_instance was renamed, so fixing the name would fix the issue.

Do you think you can send a pull request fixing it, so I can review and merge it?

Thank you.

lucasdavila avatar Jan 16 '17 20:01 lucasdavila