naresh126 Posted December 7, 2009 Share Posted December 7, 2009 Hi everyone, I am creating reports in Jasper ireports and using the generated Jasper file in my servlet to generate reports. My report contains combination of charts like pie chart,bar graphs, meter and etc.I was wondering whether i can generate pie charts with dynamic series?i mean if my department table is updated with a new department then the number of sectors(series) in my pie should increment by 1 with the respective department values.If this is really possible, how do i do it.Thank in Advance. Link to comment Share on other sites More sharing options...
lucianc Posted December 14, 2009 Share Posted December 14, 2009 Yes, it's possible. All you have to do is to query the department table and use the department as key expression for the chart.See demo/samples/charts in the JR distribution for sample chart reports.Regards,Lucian Link to comment Share on other sites More sharing options...
naresh126 Posted December 18, 2009 Author Share Posted December 18, 2009 Hi lucianc, Thanks for your reply.As I am new to this Jasper Reports i dont know how to pass the key expression for the chart.I have seen the examples pie charts in demo/samples/charts in the JR distribution, but i didnt not really understand how they did it and also am not familiar with all the options in the ireports. Could you please tell me how to do that step-by-step (with some snapshots if possible) if you have time.I have a department table and it has payments in it.I need to get the departments from the database dynamically and add sum of all payments in each department as a series in the pie. Thanks in Advance. 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