web2py-appreport
web2py-appreport copied to clipboard
PluginAppreport instance has no attribute '_get_report_instance'
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))
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.