Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: counting Post Reply Post New Topic
Page  of 2 Next >>
Author Message
sv2284
Newbie
Newbie


Joined: 18 Mar 2010
Online Status: Offline
Posts: 17
Quote sv2284 Replybullet Topic: counting
     Posted: 02 Apr 2010 at 6:41am
Group  1- General Contractor
Group 2 - Sub contractor
Group 3 - package
Group 4  details
 
In the details section I have the field that will display the requirements for each package and a field that displays the status of the requirement.  There could be 10 requirements in the details section.  I only want to count if at least one of the requirements is submitted. I placed a formula to say True or false if the requirement is submitted.
 
Then I want to count only the Subcontractors (group2) that have one of the requirements submitted.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 9:20am
Can't entirely see what youa re doing here but basicaly you can use a Running Total
Field to summarize=Subcontractor
Type=DistinctCount
Evaluate=use a formula
Your Formula=True
Reset=Never
Place in report footer for your total count
IP IP Logged
sv2284
Newbie
Newbie


Joined: 18 Mar 2010
Online Status: Offline
Posts: 17
Quote sv2284 Replybullet Posted: 02 Apr 2010 at 9:23am

I cannot count the true formula because I only want the subcontractors who have at least one true

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 9:25am
That is why in the evaluate you use a formula as:
Your formula=TRUE
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 9:38am
"Your Formula" represents what you described as "I placed a formula to say True or false if the requirement is submitted"
Since I do not know your data you likely could also do an evaluation formula that is how you get your TRUE which is likely something like:
{table.RequirementField}='Submitted'


Edited by DBlank - 02 Apr 2010 at 9:39am
IP IP Logged
sv2284
Newbie
Newbie


Joined: 18 Mar 2010
Online Status: Offline
Posts: 17
Quote sv2284 Replybullet Posted: 02 Apr 2010 at 10:36am

group 2  sv subcontractor

group 3  test requirement
 
group 4
 
                   test1 requirement              true
                   test2 requirement              true
                   test3 requirement              false
                   test4 requirement              false
 
group 2     vs subcontractor
 
group 3 test requirement
 
group 4  details
 
                     test1 requirement             false
 
Group 2       vv subcontractor
 
group  3 test requirement
 
group 4   details
 
                      test1 requirement            false
                       test2 requirement           true
 
 
I only want to count the two subcontractors who have at least one requirement that is true.  I will be counting the group2 subcontractors based on the detail section.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 10:40am
Did you try what I suggested and it did not work or are you assuming it will not work?
If it did not work what exactly did you do?
 
What I gave you will only count the sub-contractor 1 time if ANY detail requirement has a TRUE.


Edited by DBlank - 02 Apr 2010 at 10:40am
IP IP Logged
sv2284
Newbie
Newbie


Joined: 18 Mar 2010
Online Status: Offline
Posts: 17
Quote sv2284 Replybullet Posted: 02 Apr 2010 at 10:45am
I cannot use a distinct count on the subcontractor because the name can be duplicated.  group 1 is a package and the subcontractor can be under more than one package.
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 10:50am

That is different that what I understood your requirement to be.

So if a sub contractor is used by more than 1 general contractor and has a detail section with TRUE per general contractor you want them to be counted more than once?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Apr 2010 at 11:02am
If that is the case change ir to use a COUNT and alter your evaluate formula to include a new condition ...
@yourformula = TRUE and
Previous(table.generalcontractor)<>table.GeneralContractor
IP IP Logged
Page  of 2 Next >>
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