Jasper Report Question

What do I have to download to worj with JasperReport and iReport while I´m working with Servoy 5.2?

Well I have downloaded iReport 3.6.0 and JasperReport plugin version 3.0.0

I have created a report that works well from iReport but when I try to run it from Servoy I get an error. This error is an alert with no message and the Servoy console shows this:

Wrapped java.lang.Exception (C:\Desarrollo\servoy_workspace\GSDepor\forms\frmSocios.js#143)
at C:\Desarrollo\servoy_workspace\GSDepor\forms\frmSocios.js:143 (cmdReport_onAction)

The line of code 143 contains this:

plugins.jasperPluginRMI.runReport(‘gsdepor’,‘C:\Desarrollo\servoy_workspace\GSDepor\Reports\report1.jasper’,null,‘view’,null)

Any clue?

what is the error that you have in your log?

Try using iReport 3.7.1

Good morning Johan.

If you mean server log. This is the error:

2010-08-25 08:30 AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Throwable
org.mozilla.javascript.WrappedException: Wrapped java.lang.Exception (C:\Desarrollo\servoy_workspace\GSDepor\forms\frmSocios.js#143)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1828)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:199)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at script.cmdReport_onAction(C:\Desarrollo\servoy_workspace\GSDepor\forms\frmSocios.js:143)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:458)
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:382)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3916)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3829)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3751)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3606)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:270)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:212)
at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:826)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.Exception
at com.servoy.plugins.jasperreports.JasperReportsProvider.runReport(JasperReportsProvider.java:429)
at com.servoy.plugins.jasperreports.JasperReportsProvider.js_runReport(JasperReportsProvider.java:290)
at com.servoy.plugins.jasperreports.JasperReportsProvider.js_runReport(JasperReportsProvider.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
… 42 more
2010-08-25 08:30 AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Throwable
java.lang.NullPointerException
at com.servoy.plugins.jasperreports.JasperReportsServer.getJasperReport(JasperReportsServer.java:128)
at com.servoy.plugins.jasperreports.JasperReportsServer.getJasperPrint(JasperReportsServer.java:212)
at com.servoy.plugins.jasperreports.JasperReportsProvider.runReport(JasperReportsProvider.java:369)
at com.servoy.plugins.jasperreports.JasperReportsProvider.js_runReport(JasperReportsProvider.java:290)
at com.servoy.plugins.jasperreports.JasperReportsProvider.js_runReport(JasperReportsProvider.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:458)
at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:382)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3916)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3829)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3751)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3606)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:270)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:212)
at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:826)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Thomas Parry:
Try using iReport 3.7.1

I tried and still having the problem.

report that stacktrace to:

http://code.google.com/p/servoy-jasperr … ssues/list

jcompagner:
report that stacktrace to:

http://code.google.com/p/servoy-jasperr … ssues/list

Thanks Johan. The problem was that I had to set reportDirectory property instead of specifying the complete path and name of the report in runReport

BTW. How can I specify a relative path to the reportDirectory property. I mean I have my application reports under a folder in the application folder.

The application is in C:\Desarrollo\servoy_workspace\GSDepor
Under this folder I have another one to hold the applications reports named Reports