Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
By learning one will teach; by teaching one will learn
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

05
April

How Do I Highlight the Largest Value of a Group in Crystal Reports?

During a recent Crystal Reports XI training session a delegate asked me "How do I highlight the largest value within a group?"


Solution

To highlight the Details section of the largest value of a group:
  1. Create the report
  2. Add the required fields to the Details section
  3. Add the group to the report
  4. Create a Maximum Group Summary field for the report
  5. From the Report menu, select the Section Expert
  6. Within the Section Expert dialog box, select the Details section
  7. Click on the Color Tab
  8. Press the conditional format button for the Background Color
  9. Enter the following formula:

    If {Tablename.Fieldname} = Maximum ({Tablename.Fieldname}, {Group Tablename.Fieldname}) Then crLime Else crNoColor

  10. Save and close
  11. Press the OK button
  12. Run the report

If you have any questions, or need any assistance, please do not hesitate to Contact Us
1

Stefan

20
March
Hey I am a completely new to CR and I was wondering if this method is possible within a cross tab. I currently have a field in a cross tab that is actually a count of a field in my table (counts number of males and females) and then reports them within an age range. is it possible to apply the highlight to the cross tab so the field that has the highest number is highlighted? attempted the above code but do not know what the tablename would be for the cross tab or the group. thanks!
2

Julia

24
March
Hi Stefan, Thank you for your comment. The above solution, will not work within a cross tabs, as they work in a completely different way to groups in CR. Which version of Crystal Reports are you working with? The different CR versions, has different functionalities and work arounds.
3

Paul

25
May
Hi Julia, I am curious about this as well, and have the same exact question. I am using Crystal Reports 9. I have a cross-tab with a bunch of data, and want to color or highlight the largest value. Thanks!
4

Julia

27
May
Hi Paul, Thank you for your comment. Unfortunately there is no real easy way to achieve this in Crystal Reports 9. Crystal Reports 2008 & 2011, comes with a whole raft of cross tab functions that allows user to highlight the largest and smallest values of a crosstab row and/or column. I will be posting how to do this in a future blog post.

MAKE A COMMENT

Name *

Email Address *

Comment *