hai try to this coding for crystal report
first declare the variable
Dim mGrossWeight as String
if {sp_Rpt_Doc_PackingList.GrossWeight} >0 then
if {sp_Rpt_Doc_PackingList.GrossWeight} = truncate({sp_Rpt_Doc_PackingList.GrossWeight},0) then
mGrossWeight = ToText({sp_Rpt_Doc_PackingList.GrossWeight},0,"")
else
mGrossWeight = ToText ({sp_Rpt_Doc_PackingList.GrossWeight},2)
end if
mGrossWeight = mGrossWeight
else
mGrossWeight = ToText({sp_Rpt_Doc_PackingList.GrossWeight},0,"")
end if
formula = mGrossWeight