Jump to content
JasperReports Library 7.0 is now available ×

create chart XY line


2006 IR Open Dicussion

Recommended Posts

By: karibouxe - karibouxe

create chart XY line

2006-06-01 06:39

I've three fields:

- a product

- a number

 

order by month.

 

I want to show each product product by month.

 

I write in input:

- Series expression: $F{product}

- X value expression: $F{month}

- Y value expression: $F{number}

 

when i compile, i've this:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_month.getValue()));

 

any hint?

thanks for any advice

 

 

 

 

By: karibouxe - karibouxe

RE: create chart XY line

2006-06-01 06:52

An information to help me:

my field month is a type java.lang.String

 

 

 

 

By: Chris Collins - crusty_collins

RE: create chart XY line

2006-06-01 08:25

I think you can change the type of month in your query to an integer. (untested)

select CAST(month AS INTEGER),product,number from table

order by month

 

 

 

 

By: karibouxe - karibouxe

RE: create chart XY line

2006-06-01 08:44

I try your solution but it don't work

 

 

 

 

By: Chris Collins - crusty_collins

RE: create chart XY line

2006-06-01 08:48

Sorry I checked it out and it is wrong,

Not Integer but SIGNED my MySql. If you are using a different DB check out the docs.

 

Give that a try and let me know.

 

 

 

 

By: Chris Collins - crusty_collins

RE: create chart XY line

2006-06-01 09:21

I tried this on my system... use

 

select convert(month,unsigned),product,number from table

order by month

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...