Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: counting records with matching text Post Reply Post New Topic
Author Message
guy_b
Newbie
Newbie
Avatar

Joined: 12 Dec 2007
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote guy_b Replybullet Topic: counting records with matching text
    Posted: 12 Dec 2007 at 9:59am
Hi All
 
I'm using crystal xi (ver: 11.5.0.313) to report against an Access 2003 database.  I cannot modify the database as it is part of another project. Cry  I have created a query (4 tables joined) which I am reporting against.
 
One of the columns returned by my query is called [Species] and may contain "Dog", "Cat", Null or an empty string. 
 
I need to  know what percentage of records contain the word "Dog" in the species column.  I had thought that this would be a very simple function containing a variant of the count() function but I cannot find an example anywhere that allows me to specify a constraint to be used with the count().
 
I suspect that this may be very simple and I'm missing something quite simple & obvious. I do hope so anyway LOL
 
If anyone can point me in the right direction I would be very grateful Tongue
 
cheers - gb


Edited by guy_b - 12 Dec 2007 at 10:04am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 13 Dec 2007 at 12:07am
You could do a cross-tab and use the species field as the row. Then the cross-tab will perform various summary calculations and percentages for you in the columns.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
guy_b
Newbie
Newbie
Avatar

Joined: 12 Dec 2007
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote guy_b Replybullet Posted: 13 Dec 2007 at 3:23am
Thanks for that,
 
I'll try the cross-tab method you suggest.  I've not used it before but hopefully I'll find an example somewhere.
 
Cheers - GB
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 13 Dec 2007 at 7:47am
I have some introductory material you can read which is listed at the bottom of this page: Table of contents

I also have forty pages of information about cross-tabs in my book Crystal Reports Encyclopedia
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
guy_b
Newbie
Newbie
Avatar

Joined: 12 Dec 2007
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote guy_b Replybullet Posted: 13 Dec 2007 at 11:01am
Originally posted by BrianBischof

I have some introductory material you can read which is listed at the bottom of this page: Table of contents

I also have forty pages of information about cross-tabs in my book Crystal Reports Encyclopedia
 
Thanks for that Brian, I'll certainly checkout the material you suggest. If crystal does becomes a regular task I  think i'll probably need that book LOL  cheers - guy
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.