lucasdavila / web2py-appreport

web2py plugin to generate PDF reports
http://vimeo.com/18601633
Other
24 stars 10 forks source link

PluginAppreport instance has no attribute '_get_report_instance' #3

Open rahulserver opened 7 years ago

rahulserver commented 7 years ago

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))

lucasdavila commented 7 years ago

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.