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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manual Running total problem

Status
Not open for further replies.

geestrong

Programmer
Jun 24, 2005
58
US
Hello,

Using: CR XI, Oracle DB
My issue is that within the Group it is counting the multiple records. I need the formula to only count permit once.

here how the data looks now
Add# Type Permit Open

3336 (Group1) House number
12345 (Group2) permit number
S-CAP CERT - 9Group3) agency
"" or Hold (Group4) decision code

3336 BLR1 12345 YES 1
3336 BLR1 12345 YES 2

this is how it should look:
3336 (Group1) House number
12345 (Group2) permit number
S-CAP CERT - (Group3) agency
"" or Hold (Group4) decision code

3336 BRL1 12345 YES 1
3336 BRL1 12345 YES 1

Need to unique count records that meet a criteria.

Expected Output
Placed in the GF1
Department
arborist 12
Zoning 2
S-Cap 1

I am using the standard Manual Running total formulas
//@Agency place on detail line.
WhilePrintingRecords;
Numbervar ScapCountPlans;

If (GroupName ({MAJOR_PROJECT_VIEW.ACT_CODE})="S-CAP CERT" and {@OpenApplications}='YES')
then
ScapCountPlans := ScapCountPlans + 1
else
ScapCountPlans:= ScapCountPlans
@agency is referring to another formula named @OpenApplications

//@OpenApplications
If GroupName ({MAJOR_PROJECT_VIEW.ACT_CODE}) in ['HOLD'] or isnull({MAJOR_PROJECT_VIEW.PER_ACT_DECISION})
//iF (({PER_ACTIVITY.PER_ACT_DECISION} = 'HOLD') or (isnull({PER_ACTIVITY.PER_ACT_DECISION}))
then
// HOLD - OPEN
'YES'
Else
// Approved
'NO'


Thanks
Greg
 
Please ignore this post... solution found!

Thanks,
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top