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

GrandTotal Of a Group 1

Status
Not open for further replies.

iceicebaby

Programmer
Mar 18, 2004
15
0
0
US
I am using Crystal V 8.5 and created a Formula Field which calculates a distinct count in each Group i.e
DistinctCount ({USAGE_01_A.AIR_PP_SEQ_NO},{USAGE_01_A.AIR_START_RATE_PERIOD})
I can't create a GrandTotal Or a Summary Field on this Field as they become disabled. I want to calculate a Grand Total of all the values in this Field. Please Help.
 
Crystal can't total totals. Instead create the grand total formula as the grand total of the detail:
-------------------------------------
DistinctCount ({USAGE_01_A.AIR_PP_SEQ_NO})
-------------------------------------

If this is not viable because you need to cound the same value under different groups as distinct, then do a DistinctCount of a formula concatenating the Group Code and the field.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks IdoMillet for understanding the Problem and your Reply.I want to count the same value under different groups as distinct, I don't understand correcly what do you mean by "DistinctCount of a formula concatenating the Group Code and the field". Actually I want to Calculate the Sum of all the values which appear in
@test = DistinctCount ({USAGE_01_A.AIR_PP_SEQ_NO},{USAGE_01_A.AIR_START_RATE_PERIOD})
But I can't do Sum(@test) as it says "The Summary/Running Total Field could not be created". I appreaciate your Help/Suggestions.
 
Create a formula, let's call it @Group_and_Value:

Cstr({USAGE_01_A.AIR_START_RATE_PERIOD}) & Cstr({USAGE_01_A.AIR_PP_SEQ_NO}).

This will ensure that the same value under two different groups is still distinct.

Then compute your grand total as:
DistinctCount (@Group_and_Value)

Cheers,
- Ido


CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks a lot IdoMillet It worked!! I really appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top