Jasper Reports / Ireports 2.0.5 supports Rtf / Html

Ireports and Jasper Reports 2.0.5 now supports Rtf/Html.

Did some elementary testing with Rtf Area and Html Area. Looks oke.

Underline/bold looks good.

See slight problem when changing font color of part of a text.
Wil result in report with text being in specified color from start of changed text to the end of the compleet text.

Can be configured in Ireport by using new attribute MARKUP.

Regards,

Hans

Hans Nieuwenhuis:
Ireports and Jasper Reports 2.0.5 now supports Rtf/Html.

Did some elementary testing with Rtf Area and Html Area. Looks oke.

Underline/bold looks good.

See slight problem when changing font color of part of a text.
Wil result in report with text being in specified color from start of changed text to the end of the compleet text.

Can be configured in Ireport by using new attribute MARKUP.

Regards,

Hans

Opening files created with 2.0.4 or previous versions, Jasper warns me that there are deprecated instrucions.
But converting them causes the report not to work anymore when called from Servoy (no problem in using it inside iReport).

So, if you move to 2.0.5, be sure to have a backup… :slight_smile:

The error i get when running a 2.0.5 report using the jasper plugin is :

org.mozilla.javascript.JavaScriptException: java.lang.Exceprtion:
Element type “topPen” must be declared.

Maybe a Servoyan can look into this ??

Regards,

Hans

oh really? this is so cool! :D
thanks for reporting this here…

(I have send Scott an email, with a link to this topic)

Ok,

But be carefull.

There is an issue with the jasper plugin and

Opening files created with 2.0.4 or previous versions, Jasper warns me that there are deprecated instrucions.
But converting them causes the report not to work anymore when called from Servoy (no problem in using it inside iReport).

Hans Nieuwenhuis:
The error i get when running a 2.0.5 report using the jasper plugin is :

org.mozilla.javascript.JavaScriptException: java.lang.Exceprtion:
Element type “topPen” must be declared.

That’s it!
Using html field in the report would save me a lot of coding (at the moment, I’m using a table event that strips all the html code from a field and stores it in another field meant to be used in Jasper).

You’ll have to upgrade the Jasper eninge Servoy uses as well to 2.0.1 by replacing the jasper jar file in the \plugins\JasperReportsRMI folder with the latest version which IReports also uses.

Else your Jasper plugin will use an older version of the Jasper Reports engine and then offcourse a report compiled in IReports with a newer engine will fail.

Paul

Thanks Paul,

replaced the file …\Servoy\plugins\ jasperpluginRmi\jasperreports.jar with the file jasperreports-2.0.5.jar from the ireport lib directory.

Still get the same error

Regards,

hans

Have you got a full trace of the error?

Any idea what element “topPen” might be?

Think it has something to do with new features, will try to find out.
I’ll get back on that.

Full trace :

java.rmi.RemoteException: Element type "topPen" must be declared. 
     at com.servoy.r3.plugins.JasperReportServer.getJasperPrint(JasperReportServer.java:248) 
     at com.servoy.r3.plugins.JasperReportServer.jasperViewer(JasperReportServer.java:316) 
     at com.servoy.r3.plugins.JasperReportProvider.js_jasperReport(JasperReportProvider.java:196) 
     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.NativeJavaMethod.call(NativeJavaMethod.java:334) 
     at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1254) 
     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2031) 
     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94) 
     at com.servoy.j2db.scripting.e.call(Unknown Source) 
     at com.servoy.j2db.develop.debugger.k.a(Unknown Source) 
     at com.servoy.j2db.develop.debugger.k.executeFunction(Unknown Source) 
     at com.servoy.j2db.plugins.ClientPluginAccessProvider$a.run(Unknown Source) 
     at com.servoy.j2db.plugins.ClientPluginAccessProvider.executeMethod(Unknown Source) 
     at com.servoy.extensions.plugins.popupmenu.PopupMenuProvider$1.actionPerformed(Unknown Source) 
     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.AbstractButton.doClick(Unknown Source) 
     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) 
     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.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)  
2008-03-29 14:00 AWT-EventQueue-0 ERROR org.apache.commons.digester.Digester Parse Error at line 89 column 79: Element type "topPen" must be declared. 
org.xml.sax.SAXParseException: Element type "topPen" must be declared. 
     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) 
     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
     at org.apache.commons.digester.Digester.parse(Digester.java:1647) 
     at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238) 
     at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225) 
     at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213) 
     at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167) 
     at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151) 
     at com.servoy.r3.plugins.JasperReportServer.getJasperPrint(JasperReportServer.java:184) 
     at com.servoy.r3.plugins.JasperReportServer.jasperViewer(JasperReportServer.java:316) 
     at com.servoy.r3.plugins.JasperReportProvider.js_jasperReport(JasperReportProvider.java:196) 
     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.NativeJavaMethod.call(NativeJavaMethod.java:334) 
     at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1254) 
     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2031) 
     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94) 
     at com.servoy.j2db.scripting.e.call(Unknown Source) 
     at com.servoy.j2db.develop.debugger.k.a(Unknown Source) 
     at com.servoy.j2db.develop.debugger.k.executeFunction(Unknown Source) 
     at com.servoy.j2db.plugins.ClientPluginAccessProvider$a.run(Unknown Source) 
     at com.servoy.j2db.plugins.ClientPluginAccessProvider.executeMethod(Unknown Source) 
     at com.servoy.extensions.plugins.popupmenu.PopupMenuProvider$1.actionPerformed(Unknown Source) 
     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.AbstractButton.doClick(Unknown Source) 
     at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) 
     at javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.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)

Think it has something to do with “Support for JR pen tag” ??

New features Ireport:

16/03/2008 12.00 gt Included JasperServer plugin 2.1.0
16/03/2008 12.00 gt Fixed Bug artf2955: BigDecimal Parameter Not Accepting User Entry
16/03/2008 12.00 gt Fixed Bug artf2959: take in count deprecated elements of
jasper reports 2.0.4
16/03/2008 12.00 gt Fixed Bug artf2972: Preview in external app does not work if report
path has spaces
16/03/2008 12.00 gt Fixed Bug artf3018: padding issues with 2.0.4
16/03/2008 12.00 gt Support for chart render type (draw, image, SVG)
14/03/2008 12.00 gt Support for the new SWF (Flash) exporter (experimental, FLEX 3 SDK
required)
13/03/2008 12.00 gt Support for JR pen tag
12/03/2008 12.00 gt New element border editor
11/03/2008 12.00 gt Updated to Barbecue 1.5beta1
10/03/2008 12.00 gt Updated to JR 2.0.5

It sounds like Jasper has introduced a new element type, but the DTD is outdated or not updated at all. So validation fails whenever this element type is encountered. Does this report compile in iReports?

Thanks Patrick,

Yes it does, without a problem.
I also noticed that the element border properties have changed,
the way the border width is set. Maybe that causes the problem.

Hans

This is the DTD file that is used in my 2.0.4 reports:

http://jasperreports.sourceforge.net/dt … report.dtd

There I see no topPen attribute defined, so it is no surprise, that the XML parser complains about that.

Any idea what should be done now ?

Regards,

Hans

Hans,

Did you also change the lib name in the \plugins\JasperPluginRMI.jar.jnlp file? In there there is probably a reference to JasperReports.jar, whereas the new name is JasperReprots2.0.5.jat (or something close to that).

Paul

No i did not change the \plugins\JasperPluginRMI.jar.jnlp.
I renamed the jasperreports-2.0.5.jar to jasperreports.jar

That also works :-)

As for the error you’re receiving: to me it looks like an issue with Jasper Reports itself. Eitehr a bug in their new engine or a bug in their 2.0.4 to 2.0.5 converter.

Paul

Does Servoy have contacts with the Jasper guys/girls ?

Can you discuss this with them, so we get 2.0.5 working with the Jasper plugin ? Or ??

Regards,

Hans

We do not have special contacts with JasperSoft.

Did you check their forums allready to seem if this is a known issue of some sort?

Paul