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

Creating Chart - I know this has been asked alot, but not with a Excel Datasource


adiboing

Recommended Posts

Hey guys,

I'm trying to create 2 charts.

 

Here is my datasource file from excel:

http://www.bilder-hochladen.net/files/9b2l-9b.png

 

From Eaten till Pizza should be a Bar Chart and Name and Total a Pie Chart.

Now my problem is. When I tried to insert the $F{Eaten}, $F{Who}, $F{Pizza} it won't work to create the Bar Chart. It says there are errors at Eaten. So it tried and tried and finaly it worked when I inserted all values one by one... (picture below)

http://www.bilder-hochladen.net/files/9b2l-9a.png

This is the chart with my manuel typed values.

http://www.bilder-hochladen.net/files/9b2l-9d.png

 

Okay that sucks but it works somehow....

 

And my Pie Chart with Name and Total sounds easy with just the few values, but...

http://www.bilder-hochladen.net/files/9b2l-9c.png

when I include those fields it shows me an error at total... and as you've seen on top of this topic, in total are normal numeric values....

 

So do you guys have a clue why both charts are not working with the values from my excel datasource? In the Detail-Band it shows all values..

 

please help =/

peace Adi

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Alright I solved my issue again on myself :P

Actually it is easy to see the issue if you now how to create a chart right, so at this place, thanks to anyone who looked in this topic and didn't posted the answer....

 

 Don't get confused I changed from "Name" & "Total" to "Month" and "Days"

All I had to do was to write new String ($F{Month}), new Double ($F{Days}) thats it....

 

here some pics for the understanding:

http://www.bilder-hochladen.net/files/9b2l-9g.png

 

http://www.bilder-hochladen.net/files/9b2l-9e.png

 

http://www.bilder-hochladen.net/files/9b2l-9f.png

 

 

 

but I have 2 other questions:

1. When I have a Excel Datasource File and this file contains more then one table. Is it possible to switch between this tables? Or do I have to put the table on first place to use that one that I like?

2. When I get the values from the fields of an Excel Datasource then every field is a String type. Even if its a Number in Excel with a ", " and a dot for the thousend numbers like that. 8.924,50 <---- iReport can't do anything with this number. I have to format it like this 8924. But then I miss my ,50. And its not possible to say the chart us it as new Float. Does anybody has a tip or something ;)?

 

peace Adi



Post Edited by adiboing at 06/21/2011 06:58
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...