PDA

View Full Version : Problem whith Pentaho Report Desiner Ellipse object



malina
01-11-2007, 11:17 AM
Hi, everyone!

Talk about Pentaho Report Desiner 1.1.7.

In report desiner I put on report the Ellipse object. When I try to publish the report like JFreeReport XML report (xml-file) desiner convert the Ellipse object (which in JFreeReport xml should be in the next kind, for example:
/*
<element name="Ellipse.fill" type="shape/generic">
<style>
<compound-key name="min-size" class="org.jfree.ui.FloatDimension">
<basic-object name="height">-100.0</basic-object>
<basic-object name="width">-100.0</basic-object>
</compound-key>
<basic-key name="paint">#dcdcdc</basic-key>
<compound-key name="stroke" class="java.awt.BasicStroke">
<basic-object name="value">1.0</basic-object>
</compound-key>
<basic-key name="scale">true</basic-key>
<basic-key name="keepAspectRatio">false</basic-key>
<compound-key name="absolute_pos">
<basic-object name="x">0.0</basic-object>
<basic-object name="y">0.0</basic-object>
</compound-key>
<basic-key name="fill-shape">true</basic-key>
<basic-key name="draw-shape">false</basic-key>
</style>
<datasource type="StaticDataSource">
<compound-object name="value" class="java.awt.geom.Ellipse2D$Float">
<basic-object name="height">100.0</basic-object>
<basic-object name="width">100.0</basic-object>
<basic-object name="x">0.0</basic-object>
<basic-object name="y">0.0</basic-object>
</compound-object>
</datasource>
</element>
*/
)
in object whith class="java.awt.geom.Ellipse2D$Float" (- right !!!) and whith properties like in object of class ="java.awt.geom.GeneralPath" :
/*
<compound-object name="value" class="java.awt.geom.Ellipse2D$Double">
<compound-object name="segments">
<basic-object name="size">6</basic-object>
<compound-object name="0">
<basic-object name="segmentType">move-to</basic-object>
<basic-object name="x1">100.0</basic-object>
<basic-object name="x2">0.0</basic-object>
<basic-object name="x3">0.0</basic-object>
<basic-object name="y1">50.0</basic-object>
<basic-object name="y2">0.0</basic-object>
</compound-object>
<compound-object name="1">
<basic-object name="segmentType">cubic-to</basic-object>
<basic-object name="x1">100.0</basic-object>
<basic-object name="x2">77.614235</basic-object>
<basic-object name="x3">50.0</basic-object>
<basic-object name="y1">77.614235</basic-object>
<basic-object name="y2">100.0</basic-object>
</compound-object>
<compound-object name="2">
<basic-object name="segmentType">cubic-to</basic-object>
<basic-object name="x1">22.385763</basic-object>
<basic-object name="x2">0.0</basic-object>
<basic-object name="x3">0.0</basic-object>
<basic-object name="y1">100.0</basic-object>
<basic-object name="y2">50.0</basic-object>
</compound-object>
<compound-object name="3">
<basic-object name="segmentType">cubic-to</basic-object>
<basic-object name="x1">0.0</basic-object>
<basic-object name="x2">22.385763</basic-object>
<basic-object name="x3">50.0</basic-object>
<basic-object name="y1">22.385763</basic-object>
<basic-object name="y2">0.0</basic-object>
</compound-object>
<compound-object name="4">
<basic-object name="segmentType">cubic-to</basic-object>
<basic-object name="x1">77.614235</basic-object>
<basic-object name="x2">100.0</basic-object>
<basic-object name="x3">100.0</basic-object>
<basic-object name="y1">0.0</basic-object>
<basic-object name="y2">50.0</basic-object>
</compound-object>
<compound-object name="5">
<basic-object name="segmentType">close</basic-object>
<basic-object name="x1">0.0</basic-object>
<basic-object name="x2">0.0</basic-object>
<basic-object name="x3">0.0</basic-object>
<basic-object name="y1">0.0</basic-object>
<basic-object name="y2">0.0</basic-object>
</compound-object>
</compound-object>
<basic-object name="windingRule">wind-non-zero</basic-object>
</compound-object>
*/

IT IS WRONG !!!

And, of course, when I try to import the Pentaho Reporting Report Defenition throw Exception:
/*
java.lang.RuntimeException: Unsupported element encountered while importing staticdatasource: java.awt.geom.GeneralPath@fb53f6
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.addElement(JFreeReportImporter.java:512)
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.addElements(JFreeReportImporter.java:341)
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.addElement(JFreeReportImporter.java:578)
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.addElements(JFreeReportImporter.java:341)
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.importStandardBands(JFreeReportImporter.java:148)
at org.pentaho.reportdesigner.crm.report.reportimporter.JFreeReportImporter.<init>(JFreeReportImporter.java:123)
at org.pentaho.reportdesigner.crm.report.commands.ImportReportDefinitionAsXMLCommand$2.run(ImportReportDefinitionAsXMLCommand.java:167)
*/

The Ellipse object become the Subband object (whith no Shape).

Rectangle object in this case become the Subband object whith the Rectangle object inside -- it is not god too!!!!

Please help me resolve this problem!!!!

Best reguards, Alexandr!

Taqua
01-11-2007, 01:48 PM
Hi,

here JFreeReport is to blame. JFreeReport does not supply a object-description for Ellipse objects and thus whenever an ellipse is specified, a GeneralPath is written instead. The ReportDesigner cannot handle the general paths generated by the report parser, so that exception is thrown. When there is no Ellipse-Handler, the report writer should not have set the classname to 'Ellipse2D' in the first place - the classname has to be java.awt.geom.GeneralPath.

This is now fixed in the CVS - I've added a handler that writes the Ellipse-Definitions in the correct format without falling back to the GeneralPath. While working on that, I've also added a handler for the RoundRectangles as well, as there was no implementation for them either.

Regards,
Thomas

malina
01-12-2007, 09:36 AM
Hi.

How can i get the source files or jars with this resolved problem?

Best reguards, Alexandr.

malina
01-15-2007, 04:13 AM
Hi!

Please help me, how can I get the fixed sourses?
What I have to download from CVS?

Best reguards.

Taqua
01-15-2007, 09:37 AM
Hi,

the sources for JFreeReport can be found in our CVS (use tag VERSION_0_8_7_BRANCH to get the correct version, omitting the branch would give you access to JFreeReport 0.9, which cannot be used with the current tools)t

Details on how to access our CVS repository can be found here:
http://sourceforge.net/cvs/?group_id=51669

After you've upgraded your JFreeReport version, you have to rebuild the report designer as with JFreeReport 0.8.8 some core APIs have changed to support subreports. (Note that subreports cannot be edited with the current design tools.)

Regards,
Thomas