you are not 100% clear on this
*************
.). The numbers are statistics, some of which need to appear as intigers and some with two positions to the right of the decimal. For example: if ACCOUNT is equal to 990061 or 990067, I want CPUNT1, CPUNT2, etc. to print with a decimal and two positions to the right; otherwise I want to see an integer without any decimal.
*************
Does this mean that if Account is 990061 or 990067 then your numbers which are originally say 123 in the database atre to be displayed 1.23???
Another question that needs to be asked...are you just dispalying these number or are you using them for calculations as well?
For display you could do this...I am assuming {Table.Account} is a string...if not remove the quotes
//@DisplayCPUNT1 (suppressed in details section)
WhilePrintingRecords;
if {Table.Account} in ["990061","990067"] then
totext({Table.CPUNT1},2)
else
totext({Table.CPUNT1},0);
Do the same for all the other CPUNT's
If the numbers are to be used in calculations later then
//@DisplayCPUNT1 (suppressed in details section)
WhilePrintingRecords;
NumberVar CPUNT_1;
StringVar temp;
if {Table.Account} in ["990061","990067"] then
(
CPUNT_1 := {Table.CPUNT1}/100;
Temp := totext({Table.CPUNT1},2);
)
else
(
CPUNT_1 := {Table.CPUNT1};
Temp := totext({Table.CPUNT1},0);
);
Temp;
now the number is stored for future use
Jim Broadbent
The quality of the answer is directly proportional to the quality of the problem statement!