Link to home
Start Free TrialLog in
Avatar of Marcus Aurelius
Marcus AureliusFlag for United States of America

asked on

Question Related to Variables

Experts:

I need more help on this same issue from my previous posting on stringvar and booleanvar.

I didn't know how to reload the same questions for points so I started a new one.

My reporting data is like this:


FILENUMBER    ACTCODE   STATUSCODE      
1000                                        HS
1000                                        OE
1000                                        PF
1000                    PS
1000                    RC
1000                    RR
1000                    TR



I'm using the following formula #1 to try and assign a TRUE/FALSE based on the ACTCODE or STATUSCODE that is present. I will use a separate footer formula to COUNT the TRUE's as needed.

//formula #1
                 whileprintingrecords;
global booleanvar bTR;
global booleanvar bRR;
global booleanvar bRC;
global booleanvar bPF;


if {RLS.Status Code}= "PF" then
     global booleanvar bPF := true
else
if {RLS.Activity Code}= "RC" then
     global booleanvar bRC := true
else
if {RLS.Activity Code}= "RR" then
     global booleanvar bRR := true
else
if {RLS.Activity Code}= "TR" then
     global booleanvar bTR := true

The problem is that I cannot get this formula to calculate correctly When I use this formula this is what my data looks like.

FILENUMBER    ACTCODE   STATUSCODE    TRUE/FALSE    
1000                                        HS              
1000                                        OE
1000                                        PF               TRUE
1000                    PS
1000                    RC
1000                    RR
1000                    TR

I've tried other variations but can't seem to get the formula to assign the correct TRUE/FALSE to the correct lines. I need to assign a TRUE to only codes TR,RR,RC,PF when they are presesnt.

Thank you.
Mike
Avatar of Marcus Aurelius
Marcus Aurelius
Flag of United States of America image

ASKER

I need this as a result:

FILENUMBER    ACTCODE   STATUSCODE    TRUE/FALSE    
1000                                        HS              
1000                                        OE
1000                                        PF               TRUE
1000                    PS
1000                    RC                                   TRUE
1000                    RR                                   TRUE
1000                    TR                                   TRUE

<Mike
ASKER CERTIFIED SOLUTION
Avatar of bdreed35
bdreed35
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ahhh ok...yes it worked.  

As ALWAYS... thank you for the help.
Mike