ok...so we want the trillions portion of
“1,704,000,000,000,000.00”
we should probably make a generic formula to get any portion of the number... with a parameter to determine if we want the trillions,billions,millions,thousands or hundreds portion of a number
@calcPortion
whileprintingrecords;
//in general it would be stringVar x := {Table.strValue}
stringVar x := “1,704,000,000,000,000.00”;
numberVar numLength;
stringVar result;
//remove the decimal portion and the commas if they exist
x := totext(tonumber(x),0,"",""

;
numlength := length(x)
if {?Param} = "Trillions" and numlength > 12 then
(if numlength > 15 then
result := mid(x,numlength - 14,3)
else
result := left(x,numlength - 12);
)
else
result := ""
if {?Param} = "Billions" and numlength > 9 then
(if numlength > 12 then
result := mid(x,numlength - 11,3)
else
result := left(x,numlength - 9);
)
else
result := ""
if {?Param} = "millions" and numlength > 6 then
(if numlength > 9 then
result := mid(x,numlength - 8,3)
else
result := left(x,numlength - 6);
)
else
result := ""
(..... and so on .....)
I think that will work for you
Jim