Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I am developing an application with VB 6.0 and Crystal Report 7,I need the code to use distinct keyword in crystal report selection formula.

for example: suppose i have a Table name "community". Its fields are S.No, Name, DOB,Community.
Then a person can be member of more than one community (Which shown below)

S.No|Name | DOB | Community
-------------------------------------------------------
0001|Anand Kumar |18/08/1985| Delhi IT Proo
0002|Amit Kumar |14/06/1984| Delhi IT Proo
0003|Anand Kumar |12/01/1981| Delhi Computers
0004|Rishu Mehra |17/08/1986| Delhi IT Proo
0005|Shivendra |11/05/1982| Delhi IT Proo
0006|Mahendra Kumar |09/02/1988| Delhi IT Proo
0007|Anand Kumar |31/04/1983| Delhi MCA
0008|Rishu Mehra |13/09/1984| Delhi Computers

Now i want to print the distinct names from Community table with serial no only (Other fields not required), Please tell me any selection formula on Name field, So that when crystal report open it'll display only DISTINCT names ignoring other details, only distinct!

That means Result would be...

S.No|Name
0001|Anand Kumar
0002|Amit Kumar
0004|Rishu Mehra
0005|Shivendra
0006|Mahendra Kumar

Can some body help me with this? Pz Plz pLz plZ plz


With regards
Anand Srivastava
anandbpsri@yahoo.co.in
anandbpsri@gmail.com
anandbpsri@hotmail.com
Posted

1 solution

You can use a 'Group by' in the crystal report.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900