divsen Posted August 25, 2006 Share Posted August 25, 2006 Hi I am new to IReport..Can anybody tell me how to create a chart..how do i change the co-ordinates for example in a bar chart..for me..it come like 0.0,0.5,1.0 etc..i don't want it like that... pie chart does'nt work for me..i tried the example given in demosamplescharts.. but nothing comes in the output..can anybody plz help me... Thanks Link to comment Share on other sites More sharing options...
divsen Posted August 25, 2006 Author Share Posted August 25, 2006 I am new to the forum.. If there is already a post regarding this..iam sorry.. Link to comment Share on other sites More sharing options...
bklawans Posted August 26, 2006 Share Posted August 26, 2006 I'm a little unclear on what the issue with the bar chart is - is it not creating the chart correctly, or is it working but the tick marks on the axis are not what you want? On the pie chart demo - does anything show up? Is the demo database running? Any errors reported? Some info on what version of iReport, JaserReports, the JVM, etc would help too. -Barry Link to comment Share on other sites More sharing options...
divsen Posted August 26, 2006 Author Share Posted August 26, 2006 I am using Japer Reports 1.2.5 , Ireport 1.2.5 and jdk 1.5.. I have attached the results of the demo chart i get and of the one i created..mine has both pie and bar charts.. The pie chart does'nt show up..I want to change the ticks in bar chart..What reset type and increment type should i use..i have attached my jrxml file too.. If u want any more info..i will give.. Thanks Post edited by: divsen, at: 2006/08/26 17:08 Link to comment Share on other sites More sharing options...
divsen Posted August 26, 2006 Author Share Posted August 26, 2006 Post edited by: divsen, at: 2006/08/26 17:03 Link to comment Share on other sites More sharing options...
divsen Posted August 27, 2006 Author Share Posted August 27, 2006 This is the demo file Iam not able to save it as pdf..if i save it a .jprint..i cannot post it here..i saved as html..but it is not clear..coz i can post only 1 file and the images the html needs are not there Post edited by: divsen, at: 2006/08/26 17:07 Link to comment Share on other sites More sharing options...
bklawans Posted August 27, 2006 Share Posted August 27, 2006 It looks like the problem is with the empty <incrementWhenExpresion></incrementWhenExpression> that is in both chart's datasets. If I remove them you report runs and both charts display. I'll take a look and see if its a bug in JasperReport. Also, I'm not quite sure what you want pie chart to show, but as it written it will have one slice named "Ages". You should change the keyExpression to be $F{Name}. -Barry Link to comment Share on other sites More sharing options...
divsen Posted August 27, 2006 Author Share Posted August 27, 2006 I want to display the Ages in the pie chart..Number of people with a particular age as one slice..I may have given the values wrongly..I am new to this.. Did this answer your question.. Thanks Link to comment Share on other sites More sharing options...
bklawans Posted August 28, 2006 Share Posted August 28, 2006 I see. You need to create a group that changes when the ages change, and add an "order by" clause to the query so that the data comes back sorted by age. Then use the $F{age} as the key of the pie chart and $V{groupname_COUNT} as the value. If you don't want the data in the table to be sorted by age, create a second query (dataset) for the pie chart to use. If you go that route you might as well use "group by" to select the age and the counts directly from the RDBMS and not bother creating a group. -Barry Link to comment Share on other sites More sharing options...
divsen Posted August 28, 2006 Author Share Posted August 28, 2006 I tried everything you told..but still my pie chart does'nt show up...What should i do if i want the same results with a bar chart?? Thanks Link to comment Share on other sites More sharing options...
bklawans Posted August 29, 2006 Share Posted August 29, 2006 Take a look at the attached version. -Barry Link to comment Share on other sites More sharing options...
divsen Posted August 29, 2006 Author Share Posted August 29, 2006 I have attached my result for the file u gave.. I think something is set wrongly in my system..which makes it appear like this..Because i cannot think of any other reason.. This is driving me crazy.. Can u post what result the same file produces for you. Thank you very much.. Post edited by: divsen, at: 2006/08/28 21:40 Link to comment Share on other sites More sharing options...
bklawans Posted August 29, 2006 Share Posted August 29, 2006 Here is what I get. Do you see any error messages anywhere? -barry Link to comment Share on other sites More sharing options...
divsen Posted August 29, 2006 Author Share Posted August 29, 2006 It is not showing any errors..Is there any settings i must make..or nay jar files that must be added..i downlaoded the ireports windows installer and installed it on my system.. one more question..when it try to use a report with a chart in a web page..it says some org package class is not found..which is the jar i must include for that..i have included the jasperreports-1.2.5.jar file in my lib folder.. Thanks Link to comment Share on other sites More sharing options...
andysusanto Posted August 29, 2006 Share Posted August 29, 2006 hai bklawans, i have a similiary problem like divsen. When i create a 3D PieChart and compile that from ireport, i have a page that show a 3d PieChart. But when i try to compile on the fly from a Servlet. my 3d PieChart does not show. Can you help ? TIA, andy susanto Link to comment Share on other sites More sharing options...
bklawans Posted August 30, 2006 Share Posted August 30, 2006 Take a look at the webapp sample that is included with JasperReports. in the html.jsp page you can see there are some options to the JRHtmlExporter that need to be set to support images properly. -Barry Link to comment Share on other sites More sharing options...
andysusanto Posted August 30, 2006 Share Posted August 30, 2006 hai, i already follow the html.jsp, but i still cannot see my chart, could you give a war example, so i can see a diff between my code and html.jsp because what i see in the html.jsp is look like with my servlet code. TIA, andy susanto Link to comment Share on other sites More sharing options...
bklawans Posted August 31, 2006 Share Posted August 31, 2006 The webapp example does run in a war - try typing "ant war". Take a look at the HTML of the web page without the chart and take a look at what the img tag is using as the source of the image - that should give you a pretty good clue. You may alse need to run your appserver with JDPA enabled and use a debugger to figure out what is going on in your environment. -Barry Link to comment Share on other sites More sharing options...
andysusanto Posted September 1, 2006 Share Posted September 1, 2006 hai again, i examine the img tag, Jaspereport create img_0_0_4, but when i try to find that file, i cannot find it. so what wrong, i thing i still miss some code TIA, andy susanto Link to comment Share on other sites More sharing options...
Sunitha Posted September 1, 2006 Share Posted September 1, 2006 Hii am a newbiethanks for sending the sample file Graph-4f8494a4d7ae9448740bc652ee7da0c8.xmli have run the above file from ireport and i am able view the data in table but i am not able to view the pie chart,bar chart Is there any settings to be done.I am using ireport 1.2.5thanks Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted September 4, 2006 Share Posted September 4, 2006 Use new Boolean(true) as filter expression in the chart This is a workaround for a bug introduced in iR 1.2.5 Giulio Link to comment Share on other sites More sharing options...
divsen Posted September 8, 2006 Author Share Posted September 8, 2006 Thank you very much....was caught up with this problem for so long.. Link to comment Share on other sites More sharing options...
Sunitha Posted September 11, 2006 Share Posted September 11, 2006 hey thank u so muchi have generated the charts Link to comment Share on other sites More sharing options...
Sunitha Posted September 12, 2006 Share Posted September 12, 2006 hii am trying to integrate my charts with jsp pages.i am getting the following error. java.lang.NoClassDefFoundError: org/jfree/ui/Drawable Is there any jar files i should kept or any class path settings? thank you Link to comment Share on other sites More sharing options...
Sunitha Posted September 12, 2006 Share Posted September 12, 2006 i have gone through the forums i have integrated the charts thanks to all of u Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now