Crystal Distinct Count

Posted on 2004-12-01
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

    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

    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 :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    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…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now