Jump to content
We've recently updated our Privacy Statement, available here ×

iReport 1.2.5 problem with charts


javydreamercsw

Recommended Posts

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_NEXT_30_DAYS_1_2_4.txt[/file]

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

new Boolean(true)

 

 

2 - Set the compatibility options to JasperReports 1.2.0

 

3 - Update the iReport code from CVS and recompile iReport

 

4 - Modify by your self the line 5928 of Report.java (src/it/businesslogic/ireport/Report.java)

from:

 

Code:
[code]
if ( CompatibilitySupport.version >= CompatibilitySupport.JR125)

 

to

 

Code:
[code]
if ( CompatibilitySupport.version >= CompatibilitySupport.JR125 && dataset.getIncrementWhenExpression().length() > 0)

 

and recompile iReport

 

Giulio

Link to comment
Share on other sites

Hi Giulio,

Thank you very much for your help - my charts have data in them! I had to add the

Code:
, new Boolean (true),  AND set compatibility options to JasperReports 1.2.0 before it would work.

 

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:

 

CannotÂcastÂfromÂStringÂtoÂNumber valueÂ=Â(java.lang.Number)(((java.lang.String)field_CATCH_DATE.getValue()));

 

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.

 

Thanks very much for your time and help! - Martina

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...