Re: Getting a Distinct Count from Crystal
- From: Iain Sharp <iains@xxxxxxxxxxxx>
- Date: Thu, 04 May 2006 09:07:40 +0100
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
.
- Follow-Ups:
- Re: Getting a Distinct Count from Crystal
- From: John C. Harris, MPA
- Re: Getting a Distinct Count from Crystal
- References:
- Getting a Distinct Count from Crystal
- From: John C. Harris, MPA
- Getting a Distinct Count from Crystal
- Prev by Date: How to run deploy Crystal Reports reports to the users? (CR versjon 8.5)
- Next by Date: how to calculate in crystal report using VB.net
- Previous by thread: Getting a Distinct Count from Crystal
- Next by thread: Re: Getting a Distinct Count from Crystal
- Index(es):
Relevant Pages
|