I would like to report using JasperReports and have failed with the following code. I do not see syntax examples using Servoy version 6.x.x.
function printForm(event) {
try {
plugins.jasperPluginRMI.runReport(fs,‘c:\reports\report3.jrxml’ ,null,‘view’,null);
}
catch (e) {
application.output(“Error during running report\n” +e);
return;
}
}
(IN THE SERVOY CONSOLE):
Error during running report
JavaException: java.lang.Exception: null
Hi Larry,
try this:
plugins.jasperPluginRMI.runReport(fs,'c:\\reports\\report3.jrxml' ,null,OUTPUT_FORMAT.VIEW,null);
Thanks for the reply. I’m still not working. Here is what I’m doing:
plugins.jasperPluginRMI.runReport(dicustomer_to_diendpoint,‘C:\reports\report3.jrxml’,‘HP LaserJet 2200 Series PCL 5’ ,OUTPUT_FORMAT.VIEW,null)
OUTPUT ERROR: Error during evaluation: Wrapped java.lang.Exception: No jasperReport C:\reports\report3.jrxml has been found or loaded in directory c:/Reports
where:
dicustomer_to_diendpoint is a RELATION
‘C:\reports\report3.jrxml’ is the JasperReport file and the proof,
C:\reports>dir report3.*
Volume in drive C is Windows C
Volume Serial Number is D0B0-A6AA
Directory of C:\reports
03/26/2012 04:22 PM 45,685 report3.jasper
03/26/2012 04:22 PM 6,891 report3.jrxml
2 File(s) 52,576 bytes
0 Dir(s) 123,989,061,632 bytes free
C:\reports>
‘HP LaserJet 2200 Series PCL 5’ is the name of the printer
OUTPUT_FORMAT.VIEW (suggested by previous reply)
null is NULL
The problem seems to be that the plugin cannot find the report.
Have you got the jasper reports directory set in the admin page of your servoy?
If so you could just use the name of the report instead of the full path.
Also check this link Getting Started Guide - Servoy JasperReports Plugin - ServoyForge
It is still not working. I guess it not “to be”. I’ve tried every combination of file path (with and without the admin configuration) that I can think of with no luck.