Page 1 of 3

Jasper Reports / Ireports 2.0.5 supports Rtf / Html

PostPosted: Fri Mar 28, 2008 7:26 pm
by 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

Re: Jasper Reports / Ireports 2.0.5 supports Rtf / Html

PostPosted: Fri Mar 28, 2008 10:15 pm
by Riccardino
Hans Nieuwenhuis wrote: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... :-)

PostPosted: Fri Mar 28, 2008 10:47 pm
by 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.

Maybe a Servoyan can look into this ??

Regards,

Hans

PostPosted: Sat Mar 29, 2008 10:58 am
by Harjo
oh really? this is so cool! :D
thanks for reporting this here....

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

PostPosted: Sat Mar 29, 2008 11:13 am
by Hans Nieuwenhuis
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).


PostPosted: Sat Mar 29, 2008 11:42 am
by Riccardino
Hans Nieuwenhuis wrote: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).

PostPosted: Sat Mar 29, 2008 12:17 pm
by pbakker
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

PostPosted: Sat Mar 29, 2008 2:01 pm
by Hans Nieuwenhuis
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

PostPosted: Sat Mar 29, 2008 2:06 pm
by pbakker
Have you got a full trace of the error?

Any idea what element "topPen" might be?

PostPosted: Sat Mar 29, 2008 3:02 pm
by Hans Nieuwenhuis
Think it has something to do with new features, will try to find out.
I'll get back on that.

Full trace :

Code: Select all
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) 

PostPosted: Sat Mar 29, 2008 3:09 pm
by Hans Nieuwenhuis
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

PostPosted: Sat Mar 29, 2008 5:52 pm
by patrick
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?

PostPosted: Sat Mar 29, 2008 6:37 pm
by Hans Nieuwenhuis
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

PostPosted: Sat Mar 29, 2008 7:03 pm
by patrick
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.

PostPosted: Sat Mar 29, 2008 7:21 pm
by Hans Nieuwenhuis
Any idea what should be done now ?

Regards,

Hans