水晶报表去掉多余小数点

 选择水晶报表上的字段右击“设置对象格式”
选择“数字”选择卡点“自定义”
选择“数字”选择卡点“十位”后的按钮
把如下代码放进去

if Right(ToText({VIEW_DATA_RGEULARL.THEORY_QTY},5),5) = "00000" then 0 else if Right (ToText({VIEW_DATA_RGEULARL.THEORY_QTY},5),4)
   = "0000" then 1 else if Right (ToText ({VIEW_DATA_RGEULARL.THEORY_QTY},5), 3)= "000" then 2 
else if Right (ToText ({VIEW_DATA_RGEULARL.THEORY_QTY},5),   2)   = "00"   then     3  
else   if   Right   (ToText   ({VIEW_DATA_RGEULARL.THEORY_QTY},5),   1)   = "0"   then     4  else     5 

你可能感兴趣的:(报表)