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

cOUNTING DISTINCT RECORDS IN A GROUP 2

Status
Not open for further replies.

aamkumar

Programmer
Apr 3, 2007
18
US
I am using CR XI

I have to do a count of record output but just count one record if multiple occurances are there in each group

Group1A

Col1 Col2 Col3
A Fuu Ab
A Faa bc
B Fee ca
C Fun ef
D Free gh
D Fis ij
D Fic kl


Group2A
Col1 Col2 Col3
J Fun ef
F Free gh
F Fis ij
F Fic kl

I have to count in each group the each record as one if it has more than one occurance.

Please advise
 
Right click on the field in question, insert, summary, distinctcount.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Thanks a lot ..it worked....


But if I have to display just one occurance of the record that has multiple of the same field in Col1 then what method should I use.

Like out of these two records
A Fuu Ab
A Faa bc I want to display any one of the occurance.


 
Insert a group on Col1 and move the detail fields to the group header and then suppress the detail section.

-LB
 
Thanks it works,...but why it is showing just the first record when I move the fields to the GH...what is the concept behind this Behavior.

Thanks
 
The group header shows the first set of details and the group footer shows the last. You can control the order using Report > Report Sort Expert. (At least that's how version 10 does it.)

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top