Click to See Complete Forum and Search --> : Convert String to Numeric without Decimal


sync
July 29th, 2005, 12:37 AM
Hi,

I am using Crystal Report 8.5 with Visual Basic 6.0 and MS Access database. Now situation is I have to display three different values for a particular condition. If data is there then number of records else zero and if even no depedend entry is there then "NA".

Variable is numeric and formula is

if {temp.var1} = 0 and {temp.var11} = 0 then 'NA'
else if {temp.var11} = 1 then '0'
else CStr ({temp.var1})

NOW problem is if I am using this report on a system having crystal report installed and set the numeric value as no decimal, it is working fine but when I try the same program on the system on which crystal is not installed it is showing decimal values upto 2 digits. I have used Report Expert Distribution also.

Any idea how to solve this problem. Thanks

Vishal

Madhi
July 29th, 2005, 11:01 AM
Format that format field number as you want

sync
August 1st, 2005, 02:28 AM
What does it mean. Could you please help me out by writing a example code for that.

thanks

Madhi
August 1st, 2005, 03:00 AM
Roght click the field, select format section then goto number and select the required format