JasperReports plugin not working in Servoy 5.0.1

Hi All,

I’m new to Servoy, and I’m trying to use the jasperPluginRMI plugin to run a report that I created. However, when I call the report using the following code:

plugins.jasperPluginRMI.runReport(controller.getServerName(),'time_log.jasper',null,'view');

Servoy gives an error: “Can’t find method com.servoy.plugins.jasperreports.JasperReportsProvider.js_runReport(string, string,…)”

I copied servoy_jasperreports.jar, servoy_jasperreports.jar.jnlp, and the servoy_jasperreports folder to the application_server\plugins folder for my Servoy installation per the installation instructions. I even tried copying the same files and folder to the developer\plugins folder after it didn’t work initially, but still no success. I also removed the old version of the iText library from the application_server\plugins\pdf_output folder as recommended in the installation instructions.

It seems like running a report from Servoy should be simple, but I just can’t get the plugin to work. Am I missing something obvious?

Thanks,

David

Hi David!

I think you are calling runReport() function without the last ‘mandatory’ parameter (in fact, you can pass a null value)… The ‘Object parameters’ parameter…

Your code:

plugins.jasperPluginRMI.runReport(controller.getServerName(),'time_log.jasper',null,'view');

Help code of plugin:

plugins.jasperPluginRMI.runReport(source(serverName|foundset),reportFileName ,exportFileName / boolean showPrintDialog / printerName,outputFormat,Object parameters,[locale])

I hope this helps!

Best regards,

Gerardo.

That fixed it. Thanks Gerardo!

Kind of a vague error for a simple missing parameter.

David