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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sort a calculated field....HELP!!! 2

Status
Not open for further replies.

cdnamm

Programmer
Oct 25, 2002
41
US
Hello all,
I am doing a report with 3 groups, with Crystal Reports
when you group a field it's automatically sort that field.
So, I have this calculated field display in the group header 3 that I can't sort in ascending order. Here is the sample of my report:

Commercial
General(1)
10 John Smith 5
11 Carlos Gonzalez 1
12 Rose Hernandez 3

Group 1: Line of business (Commercial, Senior, Medical)
Group 2: Specialty Codes (1, 2, 3)
Group 3: ID number (10, 11, 12)
Calculated field values: 1, 3, 5

I want the report to sort by the calculated field values (1, 3, 5) so the report would display like the following format:

Commercial
General(1)
11 Carlos Gonzalez 1
12 Rose Hernandez 3
10 John Smith 5

but I couldn't since it's sort by the 3 groups so there is no way that I can't sort by the order of the calculated field.
Could somebody help me? Thank you in advanced!!!

cdnamm

 
I don't think that you need a specialty code nor ID Number grouping, just the Line of Business. Then select Database->Sort Records->Specialty Code

If this doesn't work, try posting real example data (not what a bad report might look like), and desired output.

-k
 
It looks like your "calculated field values" are some kind of summary at the group 3 level, so you might be able to use TopN. Go to report->TopN/Sort Group Expert and select the summary for sorting all records in ascending order.

-LB
 
Group on the Calculated field as Group 3 and the ID as Group 4. Then Suppress the GH and GF for the calculated field.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Hi all,

I used Mr. Ken Hamady's way and it worked. I couldn't use the top N sorting because my calculated field is not a summary. Thank you all very much for helping me!!!

Chau Nguyen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top