# display a symbol next to the maxm value on x-axis

i have data in following manner:
Measure     Value
Yes             1
No              45
N/A            56

the Measure names are static but Values are dynamic depending on some different field.
I want to display above data in a bar graph. and for Max(Value) , i want to place a triangle next to the name of the measure.i.e in this eg.,i have Yes,No, N/A on x-axis and all the values on y-axis, so i want to place a triangle next to N/A as its the maxm value of all the values. Again, these values are not static, i might get max value for Yes in some different scenario. so i want to display that triangle dynamically.
i have placed a triangle next to all the measures on x-axis. and i am conditionally suppressing that measure, i am using following formula,

Maximum:
if Maximum ({Command.Value}) = {Command.Value}  then
{Command.Measure}

but i am not getting expected results because what its doing is, it is giving 3 values, first 2 values blank for Yes and No and third value as Non Applicable.
If i place this formula in RH, it is giving me blank hence my triangle is not being displayed/suppressed, but if i place this formula in details then for first 2 details it is giving 2 blanks and last one it is displaying Non Applicable.
what do i need to do in order to get this problem solved?

new_crystal
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
I take it that {Command.Value} is just a field in your records and not some kind of total?

Where are you putting that formula?  Are you actually using it in the "suppress" formula in the field format for the triangle, or somewhere else?  That kind of suppression formula has to return a true or false value, and your formula does not do that (unless {Command.Measure} is a boolean field).  It sounds like you may be using that formula to output the {Command.Measure} field.

Try the following in the "suppress" formula in the field format for the triangle field:

{Command.Value} <> Maximum ({Command.Value})

James
0
Author Commented:
yes, i am using the formula in the suppress of the format field of triangle.
I tried with your formula but it is suppressing all the traingles.
coz these traingles are in RH.
I am attaching a pdf file of the report for the reference, in this example, all the triangles are displayed but i want triangle to be displayed only next to 'No' as the value for it is the highest, all other triangles should be suppressed
testingbargraph.pdf
0
Commented:
You have a chart in the report header?

Are these triangles somehow part of the chart, or separate fields in the report header?

If they're separate fields in the report header, I don't think your current formula is going to work, for a couple of reasons:

1) Generally speaking, CR has not read the records yet when it produces the report header.  Obviously it would read them to produce the chart, but I don't think that will help as far as other fields in the report header go.  So, I don't think {Command.Value} would have any value yet, and CR certainly wouldn't have a maximum for it.

2) You're trying to compare the current value ({Command.Value}) to the maximum.  That will only work somewhere in the body of the report (eg. detail or group header or footer section), where different records are being read.  In the report header, _if_ {Command.Value} had a value (and I don't think it would), it would only be the value from the first record.  IOW, {Command.Value} would be the same for each field, so they would all be suppressed or not suppressed.

If these are separate fields and not a part of your chart, then about the only thing I can think of would be to have something save each value in a variable before you get to that point and then compare those saved values to the maximum.

If you could move the chart, or these fields, to the report footer, then the values could be saved in the body of the report.

If these fields have to stay in the report header, then a subreport in a report header section before that one could read the data and save the values (including the maximum) in shared variables.

James
0
Author Commented:
thanx for all the help!
but i got the solution on my own, i used a formula:
if {measure} = "Yes" then
{value}
I inserted this formula in the details, and summarized it, then i used this summary in the suppression formula of the triangle, it is working fine now!
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
Hmm.  Sounds too simple , but sometimes it's just a matter of approaching the problem from the right angle.  Glad you found a solution and thanks for posting what it was.

James
0
Commented:
Or having the report and the data to try various ideas including off the wall ones.

mlmcc
0
Commented:
Well, yeah, that helps too.  :-)

James
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.