Crystal Distinct Count

Hi

I have a field with telephone numbers and 'null' value.  I want to perform distinct count on this field but want to exclude the null values from the distinct count.  Any ideas how i can do this?  

I only want to count the tel nos and not the null values
jkharodiaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bdreed35Commented:
Have you tried using the Distinct Count Summary function?  I tried this on a field that has a NULL value and it didn't count the NULL values.

Insert menu, Summary.
Choose your telephone field, summary type should be distinct count, and locaiton should be either Grand Total or the appropriate grouping, if applicable.
0
Renante EnteraSenior PHP DeveloperCommented:
Hello jkharodia!

Another workaround.  You can also create a stored procedure :

Create Procedure CountTelNo As

Select distinct telno, count(*) counter
From TableName
Where telno Is Not NULL
Group By telno

Then refer to this procedure for your report.

Hope this helps you.  Just try it.


Goodluck!
eNTRANCE2002 :-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.