dnvsrikanth Posted August 23, 2007 Share Posted August 23, 2007 Hi I have a requirement like this: Suppose that I have already extracted data from database using an SQL query. Now I want to generate a chart for this data dynamically based on the user input.What I mean to say is user is given choice to select what type of chart he needs. Based on the user input we need to generate the chart. How to do this...Am looking for it for about one month. :( Can anyone please help me out in this regard Thanking You DNV Srikanth Link to comment Share on other sites More sharing options...
dnvsrikanth Posted August 23, 2007 Author Share Posted August 23, 2007 can anyone help me in this regard... Link to comment Share on other sites More sharing options...
freeman Posted August 24, 2007 Share Posted August 24, 2007 Hello DNV Srikanth, a possible solution with not as much effortis to create report templates which only differsin the chart visualisation. Use the great iReporttool, so it is max an one hour job.Than in your application you choose the used reporttemplate depending on the users choice for a chartstyle. Maybe there are other solution. So I don't know, ifcharts are parametrizable so that you can change it bydefining parameters at runtime. Maybe you should by the Ultimate Guide. freemanPost edited by: freeman, at: 2007/08/24 09:57 Link to comment Share on other sites More sharing options...
AsyNew Posted August 24, 2007 Share Posted August 24, 2007 Hi,I had the same problem,so i put the two types of charts in the same report, with a condition in the (print when expression" that you will find when you double click on the chart , in the onglet "common".So there you write sth like that:Code:New Boolean($P{chart}.equals("Bar chart"«»)) And i send the type of chart by a parameter.So finally , according to the value parameter the adequate chart will be displayed.I hope i will help.(sorry for the bad english :blush: ) Link to comment Share on other sites More sharing options...
dnvsrikanth Posted August 24, 2007 Author Share Posted August 24, 2007 thanks for your reply freeman, But my requirement is like this:modification should be done in same jrxml report template dynamically without creating a seperate jrxml file for each type of chart. Can we do this??? If we can, how can we do so??? Thanking YouDNV Srikanth Link to comment Share on other sites More sharing options...
freeman Posted August 24, 2007 Share Posted August 24, 2007 The solution of the problem that meets yourrequirements came from AsyNew. I have not testedit.You should try his way. It sounds a bit like atrick but it is easy to implement. 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