Print Page | Close Window

Configuring a Count by type

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
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=22850
Printed Date: 29 Apr 2024 at 8:11pm


Topic: Configuring a Count by type
Posted By: lowspark
Subject: Configuring a Count by type
Date Posted: 20 Dec 2019 at 6:44am
New but learning!.
I am trying to do a complicated report but I am breaking it down to some manageable questions piece by piece. I have a table for Work orders. I need to start my report by listing all the different departments with in the Work Order Table whit a count of how many work orders by department .. then for each Department a sub report of the different status of Work Orders and count. It seems simple but i keep on getting a count of 1.

What I have done:
Started a new report
Added in WOCATEGORY (Departments)
     -selected that field and chose the sigma button to
     sum that field
Added a sub report
     - addded in WOCATEGORY
     - added in STATUS
     - chose Select Expert and chose {Status} =
       "Closed"
     - Chose STATUS and selected that field and chose
       the sigma button to sum that field
Added a sub report
     - addded in WOCATEGORY
     - added in STATUS
     - chose Select Expert and chose {Status} =
       "OPEN"
     - Chose STATUS and selected that field and chose
       the sigma button to sum that field

What i end up with is list of all my departments with no count, status of closed with not count and a status of open whit a count of 1?

I need to list all the differet types of Work Orders not just open and closed as well...?
Thanks for you help!




-------------
Nothing left to do but Smile, Smile, Smile.



Replies:
Posted By: DBlank
Date Posted: 23 Dec 2019 at 8:42am
Using the Sub Report you would need several shared variables to pass counts of each status type back and forth between main and sub reports. Again, I would reconsider using a SR at all.


Posted By: lowspark
Date Posted: 23 Dec 2019 at 12:34pm
Thank you so much for your response. IF i do not use sub reports what you you suggest to use?

-------------
Nothing left to do but Smile, Smile, Smile.


Posted By: DBlank
Date Posted: 24 Dec 2019 at 4:14am
One data set with groupings.
Group on Program then status
I don't really know your business data so it is hard to say specifically. In general the way you were thinking of sub reports seemed more like sub groupings of a whole data set that you need to parse


Posted By: lowspark
Date Posted: 31 Dec 2019 at 4:33am
This is what worked for me with some help..

the insert summary button (Sigma button) and
pick the field as WorkerID
Type as DistinctCount
location = Group 1 (repeat for group 2).
This will insert a summary field into each group footer that you select. You can drag it into the header group header.

You can see the whole conversation here: https://bit.ly/2Faygnq

-------------
Nothing left to do but Smile, Smile, Smile.



Print Page | Close Window