You would have to convert both to strings to get that format - Crystal will always format numbers based on the number of decimals you set for the field - it's not variable.
So, you would have to do something like this:
If Right(ToText({rptProductAction2.Quanty}, 2) = '00' then
ToText({rptProductAction2.Quanty}, 0, '')
else ToText({rptProductAction2.Quanty}, 2, '')
-Dell