# JasperReport syntax using servoy 6.x.x

**URL:** <https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743>\
**Category:** Classic Servoy\
**Created:** [March 28, 2012, 10:27pm UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743 "2012-03-28T22:27:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry.gormley](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@larry.gormley](https://forum.servoy.com/u/larry.gormley)\
**Post date:** [March 28, 2012, 10:27pm UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743/1 "2012-03-28T22:27:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jdbruijn](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jdbruijn](https://forum.servoy.com/u/jdbruijn)\
**Post date:** [March 29, 2012, 12:54pm UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743/2 "2012-03-29T12:54:51Z")

</div>

Hi Larry,  
try this:

```auto
plugins.jasperPluginRMI.runReport(fs,'c:\\reports\\report3.jrxml' ,null,OUTPUT_FORMAT.VIEW,null);

```

---

<div class="post-metadata">

**Author:** ![larry.gormley](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@larry.gormley](https://forum.servoy.com/u/larry.gormley)\
**Post date:** [March 30, 2012, 3:32am UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743/3 "2012-03-30T03:32:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jdbruijn](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jdbruijn](https://forum.servoy.com/u/jdbruijn)\
**Post date:** [March 30, 2012, 6:49am UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743/4 "2012-03-30T06:49:54Z")

</div>

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](https://www.servoyforge.net/projects/servoy-jasperreports/wiki/Getting_Started_Guide#Run-the-Report)

---

<div class="post-metadata">

**Author:** ![larry.gormley](https://avatars.discourse-cdn.com/v4/letter/l/858c86/32.png) [@larry.gormley](https://forum.servoy.com/u/larry.gormley)\
**Post date:** [March 30, 2012, 8:04pm UTC](https://forum.servoy.com/t/jasperreport-syntax-using-servoy-6-x-x/15743/5 "2012-03-30T20:04:15Z")

</div>

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.
