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

Grouping in Crystal 9.2 2

Status
Not open for further replies.

lana123

Programmer
Aug 20, 2003
79
US
Hi,people.
I have to show the field in the report that is has to be found by the formula:
Sum (distinctcount({Table1.Field1}))
but I get the message that "this field cannot be summarized"
I'll appreciate if anybody has an idea how can I get this value in Crystal(Oracle db).
Thanks,

Lana
 
You might try describing the requirements rather than describing how you're trying to use a function.

A distinctcount would provide the number of times a unique entity exists, hence one would never sum it, it's already the count, the sum of it would simply be itself as distinctcount is already an aggregate.

Perhaps you're trying to get the sum of some distinct counts at a group level or something like that, if so, please post accordingly, your request doesn't make any sense.

If it's the sum of distinctcount for a group you want, try the following formula in the group footer:

whileprintingrecords;
NumberVar SumDist;
SumDist := SumDist+DistinctCount ({Table.field},{Table.group});

Then you can display it in outer groups or the report footer using:

whileprintingrecords;
NumberVar SumDist;
"Total is : "+ totext(SumDist)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top