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

Posted on 2008-11-06
Last Modified: 2012-05-05
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,

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

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?

thanks in advance,
Question by:new_crystal
    LVL 34

    Expert Comment

    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})


    Author Comment

    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
    LVL 34

    Expert Comment

    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.


    Accepted Solution

    thanx for all the help!
    but i got the solution on my own, i used a formula:
    if {measure} = "Yes" then
    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!
    LVL 34

    Expert Comment

    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.

    LVL 100

    Expert Comment

    Or having the report and the data to try various ideas including off the wall ones.

    LVL 34

    Expert Comment

    Well, yeah, that helps too.  :-)


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now