Print Page | Close Window

Counting different items same column

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22608
Printed Date: 15 Aug 2020 at 12:23am


Topic: Counting different items same column
Posted By: gasmith74
Subject: Counting different items same column
Date Posted: 22 May 2018 at 6:31pm
I have a column for case status in my report and the field for each case will either say pending or completed.

I want to count those 2 different "words" within the column.  I am thinking I would need to create my own formula within the summary function, but not sure if that would be 2 different formulas or if I could combine into 1 formula.

This is what the column looks like in the report:

STATUS
Pending
Pending
Completed
Pending
Completed

This is the summary I am trying to create in the group footer:

Total cases pending:
Total cases completed:

Thanks in advance for any help.





Replies:
Posted By: hilfy
Date Posted: 23 May 2018 at 8:08am
There are a couple of different ways you can do this. Probably the easiest would be to use running totals. You'll create two of them - one for each status you want to count. You'll configure it like this:

Running Total Name: Give it a name.

Field to Summarize: If you have one, I would use an ID field of some sort here - something that is unique to the detail record.

Type of summary: distinct count (or just count if you don't have anything unique in the record.)

Evaluate: Use a formula. The formula would look like this:

{MyTable.StatusField} = 'Pending'

Reset: On change of group - the group where where you'll put the values in the footer.

If you need both group-level totals and grand totals, you'll need to configure separate running totals for each.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: gasmith74
Date Posted: 23 May 2018 at 11:16am
Thanks so much.  That seemed to work.  I was able to create 4 RTs 2 each for 2 different group footers.

Again, appreciate the help.

Andy



Print Page | Close Window