iReport 1.2.5 problem with charts

0
In v 1.2.5 reports that where working on 1.2.4 doesn't show the graphs on 1.2.5.

While comparing the two jrxml files found a difference on the same report when ran with different versions.

Here's the difference:

1.2.4 (working graph:

<dataset >

</dataset>

1.2.5 (not working):

dataset >

<incrementWhenExpression><![CDATA[]]></incrementWhenExpression>

</dataset>

Attached is the full jrxml of the working one.

[file name=NCR_NEXT_30_DAYS_1_2_4.txt size=20095]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/NCR...
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 3 years 1 week ago

13 Answers:

0
Same here, although i started up with v1.2.5.
I had to put java.lang.Boolean.TRUE in
Chart Properties/Chart Data/Increment When Expression
field to display the chart, thanks to your post.
loran's picture
1
Joined: Jul 26 2006 - 1:56pm
Last seen: 13 years 2 months ago
0
Thank you,

I was having the same problem when setting compatability to v 1.2.5 my chart would show no data.

Putting java.lang.Boolean.TRUE in
Chart Properties/Chart Data/Increment When Expression made my data display.

Could you tell me why that statement caused the data to display? I don't want to use your valuable suggestions and not understand why they are used.

Again thank you so much for your help.

Now if I can figure out why my Sub-Reports don't work.

Sam :whistle:
sneatherlin's picture
Joined: Jul 19 2006 - 5:18am
Last seen: 13 years 3 months ago
0
Hi Sam,
I'm using iReport ver. 1.2.5. I entered java.lang.Boolean.True in Chart Properties/Chart Data/Increment When Expression and I still don't see any data in the chart. The data shows in columns above the chart and the labels show but no data. Do you have any suggestions? Thanks, Martina
Martina's picture
Joined: Jul 31 2006 - 7:45am
Last seen: 13 years 2 months ago
0
There is a bug in iReport 1.2.5 that prevents to correctly collect data for charts and crosstabs
if the filterWhenExpression is not set.

Workarounds (4 possible solutions):

1 - (suggested solution) Add the following expression in the incrementWhenExpression field
in the chart (and/or crosstab) properties dialog:

Code:
<br />
new Boolean(true) <br />
</td></tr></tbody></table><br />
 <br />
 <br />
2 - Set the compatibility options to JasperReports 1.2.0 <br />
 <br />
3 - Update the iReport code from CVS and recompile iReport <br />
 <br />
4 - Modify by your self the line 5928 of Report.java (src/it/businesslogic/ireport/Report.java) <br />
from: <br />
 <br />
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre><br />
if ( CompatibilitySupport.version >= CompatibilitySupport.JR125) <br />
</td></tr></tbody></table><br />
 <br />
to <br />
 <br />
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre><br />
if ( CompatibilitySupport.version >= CompatibilitySupport.JR125 && dataset.getIncrementWhenExpression().length() > 0) <br />
</td></tr></tbody></table><br />
 <br />
and recompile iReport <br />
 <br />
Giulio
giulio's picture
26496
Joined: Jan 2 2007 - 4:15pm
Last seen: 8 months 2 weeks ago
0
The process described is the way around it.

Did you make sure that the query returns a non empty dataset?

Is your chart setup propertly? (Series defined correctly)

Please provide more detail on the chart settings in order to help.
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 3 years 1 week ago
0
Thanks... that worked for me too :)
ajorgensen's picture
Joined: Aug 1 2006 - 2:49am
Last seen: 13 years 2 months ago
0
Hi Giulio,
Thank you very much for your help - my charts have data in them! I had to add the
Code:
, new Boolean (true), </td></tr></tbody></table> AND set compatibility options to JasperReports 1.2.0 before it would work.<br />
<br />
Now for the next questions... The catch date is datatype varchar2 (6) because I have to group historic data by month & day, no year. I need the catch date on the category axis and I get the following compile error:<br />
<br />
CannotÂcastÂfromÂStringÂtoÂNumber valueÂ=Â(java.lang.Number)(((java.lang.String)field_CATCH_DATE.getValue()));<br />
<br />
Also, what is the syntax for adding two fields to the series expression? I need to show points for historic data and current year harvest data.<br />
<br />
Thanks very much for your time and help!  - Martina
Martina's picture
Joined: Jul 31 2006 - 7:45am
Last seen: 13 years 2 months ago
0
Hi Guilo,

I had the same problem. I also had to :

1 - (suggested solution) Add the following expression in the incrementWhenExpression field
in the chart (and/or crosstab) properties dialog:

new Boolean(true)

AND

2 - Set the compatibility options to JasperReports 1.2.0

Thanks,

Sean
sean's picture
1
Joined: Aug 2 2006 - 7:31am
Last seen: 13 years 2 months ago
0
Thanks so much for this fix!
timmyd's picture
11
Joined: Jul 26 2006 - 5:39am
Last seen: 13 years 2 months ago
0
Thanks so much for this fix!
timmyd's picture
11
Joined: Jul 26 2006 - 5:39am
Last seen: 13 years 2 months ago
0
To cast from String to Integer:

new Integer( $F{CATCH_DATE} )

Pay attention that CATCH_DATE must represent a number even if it is a string...


Giulio
giulio's picture
26496
Joined: Jan 2 2007 - 4:15pm
Last seen: 8 months 2 weeks ago
0
Hi, first I have IReport 1.2.5 ,I have a problem with a CrossTab, I add a "new Boolean (true)" and change the compatibility for 1.2.0, but it appears this error: "CrosstabÂdataÂhasÂalreadyÂbeenÂprocessed" ; now if change the compatibility to 1.1.0 this error disappears but the report this emptiness, please excuse my English, I need a help!!
I need an example, because not if it lacks something.
Thank you, Saludos!!!! :dry:
SuperPojo's picture
Joined: Aug 18 2006 - 12:27am
Last seen: 2 months 1 week ago
0
Check the time series chart...
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 3 years 1 week ago
Feedback
randomness