Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in passing parameters to graphs 2

Status
Not open for further replies.

reddyogili

Programmer
Apr 8, 2005
24
0
0
US
Hi All, below here I am mentioning all the fields in my table. I am having a table by name

NETCOOL_HISTORY in which I have the fields

Impact1 Numeric
Impact2 Numeric
Impact3 Numeric
Impact4 Numeric
Impact5 Numeric
Node Varchar
Manager Varchar
Last occurrence Datetime

Here what I need to do is, I need to generate a graph based on user inputs, I mean user will have 4 parameters, in which

1. First parameter will be Impact ( Here the user can select any one of the fields from Impact1 to Impact5, )
2. Node parameter( Here he will be selecting one value from node)
3. Manager parameter(Here he will be selecting one value from manager)
4. Date Parameter( Here he will select a range for Last occurrence)

Based on these parameters I need to generate a line chart x and y axis(curve).


Here Node, Manager, Impact, Date are the inputs the user will be giving in the parameter (once we refresh the report). With these inputs I need to develop an impact graph based on the node input under a particular manager with in the specified date range.

Hope some one got a clear picture about this. Please do help me .

Thanks in advance.....
reddy.


 
You need to create the parameters for Node, Manager, and Date and add them to your record selection formula. The graph itself should use the fields, not the parameters, with the exception that for the impact fields, you will instead need to use a formula something like:

//{@Impact}:
if {?Impact} = 1 then {table.impact1} else
if {?Impact} = 2 then {table.impact2} else
if {?Impact} = 3 then {table.impact3} else
if {?Impact} = 4 then {table.impact4} else
if {?Impact} = 5 then {table.impact5}

-LB
 
Dear LB,

I like select case better for those types of things:

Select {?Impact}
Case 1 : {Table.Impact1}
Case 2 : {Table.Impact2}
Case 3 : {Table.Impact3}
Case 4 : {Table.Impact4}
Case 5 : {Table.Impact5}
//Default : 0
// You can use default which states if all others are false, hence Default is true return this. He can then test for {?Impact} = 0 or whatever number he wants and display a message on the report 'Invalid Impact Code, Please run again'

I like the select case becuase I think it is easier to read.

Regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Dear rosemary and LB,

It worked out gr8. Thanks for you both. One more problem i am facing is, is it possible for me to get multiple lines on the graph.Lets say i am passing 3node inputs in the parameter node with one manager and specific daterange.

Is it possible to generate one curve for first node input and one for second node input and one for the third node input in the same graph with different colors for each input.

I hope you guys can help me out with this.

Thanks in advance,
reddy.
 
Dear Reddy,

You should be able to create a chart on Change of Node. I would suggest playing with the charting options and the On Change of Fields. Once you have a chart developed you can also split the axis so that you get dual axis if this is what you want.


regards,
ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Dear rosemary,

if i go with on change of Node, then i wont be able to display date range in x-axis. Even i cant see the line graph.

what i did is i placed the chart once per report and on change of field i replaced it with on change of record:daterange and in the show values i placed the formulae for the impact and then i am able to display one line for one input.

but if i do the same with multiple nodeinputs then the graph is comming in a very congested manner, so any suggestions.

Thanks in advance,
reddy.
 
Dear Reddy,

Why don't you group on Node and Have the chart Once Per Group ... then you can show the data per node charted, but not have all the congestion.

does that help?

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
dear rosemary,

i already tried grouping on node and placing it once per group. when i did that the report is generating two charts for 2 nodeinputs.

But what i need is, for 2 nodeinputs, 2lines should generate on only one graph(yaxis). so that the user will be able to see the difference between the 2 lines based on the impact in the chart.

The point is the chart should be only one, but the lines on yaxis should generate based on node inputs. if we give 2node inputs 2 lines should generate on one chart.

i dont whether it is possible r not. Hope you will suggest me. once again i am very sorry for taking your time.

Thank you so much,
reddy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top