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!

activity code formula

Status
Not open for further replies.

ChipF

Technical User
Nov 15, 2002
50
US
How do you code a formula to pull only applications where the activity code DP has been used but not DI?


(application table) app# = app.opr_app_nr
(activity table ) activity code = act.act_cd


 
(application table) app# = app.opr_app_nr
(activity table ) activity code = act.act_cd


this is pretty confusing but I suppose you are indicating the fields involved

your record selection formula should be

act.act_cd = "DP"


I don't understand where a problem would be



Jim Broadbent
 
If you want only those applications that have used the DP code and have not used the DI code, then:

1-Record Select: {act.act_cd} in ["DP","DI"]

2-Group on {app.opr_app_nr}

3-Create a formula {@DPDIvalue}, place in details section, and suppress:

if {act.act_cd} = "DP" then 100 else
if {act.act_cd} = "DI" then 1

(If it is possible to have more than 100 instances of "DI" then change the 100 to 1000 in the formula above and below.)

4-Add the following Group Select:

remainder(sum({@DPDIvalue},{app.opr_app_nr}),100)= 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top