Jump to content

How to generate the charts dynamically


dnvsrikanth

Recommended Posts

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

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello DNV Srikanth,

 

a possible solution with not as much effort

is to create report templates which only differs

in the chart visualisation. Use the great iReport

tool, so it is max an one hour job.

Than in your application you choose the used report

template depending on the users choice for a chart

style.

 

Maybe there are other solution. So I don't know, if

charts are parametrizable so that you can change it by

defining parameters at runtime.

 

Maybe you should by the Ultimate Guide.

 

freeman

Post edited by: freeman, at: 2007/08/24 09:57

Link to comment
Share on other sites

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

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 You

DNV Srikanth

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