Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count based on criteria HELP

Status
Not open for further replies.

dday01

Technical User
Feb 1, 2002
138
US
This is my first time using crystal and I am having trouble coming up with the syntax for the count that I want.
I am looking to get a distinct count of Client_ID where the field unknown/unreported is equal to 1 (the unknown/unreported field is in the same table. I am using this count as a group field (the clients I am counting are grouped by Agency then by Program) I am putting the count field in the Program group heading next to the program name. I would like it to show the individual count next to each program (not the running total from program to program)

Also I would use the formula generator to create this, right?

Any help would be greatly appreciated.

Thanks,

D
 
dday01,

I have read through your post several times and am just not understanding.

If you can post a layout of your data the way you would like to see it, that may help.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Hi Rosemary,

Its tough because I really don't know crystal. What I have is a report grouped by Agency then by Program. I need a count of unique client id's(due to having to include a transaction table I have multiple instaces of the client demographic records) who have a value of 1 in the unknown /unrepoted field (also in the client demographic table. What I want to see is the following:

Agency: programs: Unknown/unreported clients
agecy xyz
program1 10
program2 12
agecy abc
program1 15
program2 20
etc...
 
Dday01,

I don't see any information for totals. Are you expecting this:

Agency: programs: Unknown/unreported clients
agecy xyz
program1 10
program2 12
---
22
agecy abc
program1 15
program2 20
----
35

If so just click on the field in the detail, insert summary sum, check for all groups.

If I don't have this right, please advise.

ro
Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Hi Rosemary,

The total part would be nice and I will probably add that later, but all I really need right now is the count of unique clients for each program (unknown/unreported clients column)

Any help is appreciated

Thanks,

D
 
Dday01,

I must be in dense mode today because I don't understand what you are not getting.

What have you got so far? If what you have so far is this:

agecy xyz
program1 1
program1 1
program1 1
program1 1
program2 1
program2 1
program2 1


agecy abc
program1 1
program1 1
program1 1
program1 1
program2 1
program2 1
program2 1

Then another group for program and insert in the details a sum of unknown.
Suppress the detail section.

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Hi Rosemary,

I am probably the dense one. I have the agency grouping and the program grouping. I can't just do a sum on unknown unreported, because as i had mentioned earlier that the client demographic table is linked to a transaction table so there is an instance of an individuals client demographics for each transaction that is there ie. an individual client may have 5 demographics records because they have 5 transactions. I hope this makes things a little clearer.

Thanks,

D
 
D,

Please, lay out the data as it is currently showing.

Please give me data: Tables, Fields, Joins.

Or

Save your report with data and email it to me so I can look at this.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top