Crystal Distinct Count

Posted on 2004-12-01
Medium Priority
Last Modified: 2008-04-16

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
Question by:jkharodia
LVL 28

Expert Comment

ID: 12718429
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.
LVL 14

Accepted Solution

Renante Entera earned 750 total points
ID: 12723763
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.

eNTRANCE2002 :-)

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question