morechocolate
Technical User
Rather than doing something like this:
Local NumberVar x;
if {vExtHoldingReports.RATING} = "GOV" then x := 1 else
if {vExtHoldingReports.RATING} = "AGY" then x := 2 else
if {vExtHoldingReports.RATING} = "AAA" then x := 3 else
if {vExtHoldingReports.RATING} = "AA+" then x := 4 else
if {vExtHoldingReports.RATING} = "AA" then x := 5 else
if {vExtHoldingReports.RATING} = "AA-" then x := 6 else
x := 0;
I tried doing something like this the following, but it returns the value of true on each record if I do not put the x and it returns the last x value if I include the last x. I need it to put the appropriate value in the details section. I will also have to use x in another formula. I suppose I need to make that a global variable.
WhileReadingRecords;
Local StringVar Array Ratings;
Local NumberVar cnt;
Local NumberVar x;
Ratings := ["A","A-","A+","A1","A-1","A-1-","A-1+","A2","A-2","A-2-","A-2+","A3","AA","AA-];
For cnt := 1 to UBound(Ratings) Do
(
x := cnt
);
x <-- without this I get True, with it I get the upper bound value for all records.
Thanks
Pam
Local NumberVar x;
if {vExtHoldingReports.RATING} = "GOV" then x := 1 else
if {vExtHoldingReports.RATING} = "AGY" then x := 2 else
if {vExtHoldingReports.RATING} = "AAA" then x := 3 else
if {vExtHoldingReports.RATING} = "AA+" then x := 4 else
if {vExtHoldingReports.RATING} = "AA" then x := 5 else
if {vExtHoldingReports.RATING} = "AA-" then x := 6 else
x := 0;
I tried doing something like this the following, but it returns the value of true on each record if I do not put the x and it returns the last x value if I include the last x. I need it to put the appropriate value in the details section. I will also have to use x in another formula. I suppose I need to make that a global variable.
WhileReadingRecords;
Local StringVar Array Ratings;
Local NumberVar cnt;
Local NumberVar x;
Ratings := ["A","A-","A+","A1","A-1","A-1-","A-1+","A2","A-2","A-2-","A-2+","A3","AA","AA-];
For cnt := 1 to UBound(Ratings) Do
(
x := cnt
);
x <-- without this I get True, with it I get the upper bound value for all records.
Thanks
Pam