Re: Getting a Distinct Count from Crystal



On Wed, 3 May 2006 15:02:45 -0400, "John C. Harris, MPA"
<harris@xxxxxxxx> wrote:

I may be tired and just thinking about this the right way, so I am turning
to the NG's for help....

I have a database with visitors to a center. Although they login in one
table, there is another table that captures each visit.

The report I need is a count of those persons that visit only once and never
come back again exclusive of those that visit more than once.

For example, if "John" visitied on Monday and tha was the only time he came
in, he would be in an unduplicated list. Then "Mary" visted every day this
week, so she would be in the duplicated list.

I have tried grouping by name, the counting the instances of a date/time
stamp on the visitor table, then selecting onling those equal to "1", but
cannot then SUM that Count.

Any help is appreciated....

Is this from SQL?

If so, replacing the tables in your report with a command similar to

select person, blah, blah,
from logins inner join visits on ....
group by person, blah, blah
having count(person) = 1

will cause all the selection work to be done in the database. Thus a
simple count in Crystal will give you the answer.

Alternatively, try Running total rather than summary. It give you a
lot more control over what and when you count

Something like

Count, On change of group, When count(visits,person) = 1

Iain
.



Relevant Pages

  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ... a certain visitor in the Session, and use that value to start the right ...
    (comp.lang.php)
  • Re: PDO: Switch database user without reopening connection
    ... At the bare minimum there will be a login user who only has ... the postgres user they are logged in as to one that can make ... modifications to the database as well (editors get update permission, ... As database connections are expensive to ...
    (comp.lang.php)
  • RE: How to allow users to change their password?
    ... be set up to provide the Security dialog window for password changes. ... I'll have to login using their login ... > name/password first. ... See http://www.QBuilt.com for all your database needs. ...
    (microsoft.public.access.security)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Enter user name, enter password, then press enter...
    ... What do you do when the customer asks that the database login in be the same ... username and password to use all of the stuff that she is permitted to use. ... I have implemented this type of security for Access, VB, and Web Based ASP ...
    (microsoft.public.access.forms)