1. 程式人生 > >水晶報表判斷保留兩位小數位位數

水晶報表判斷保留兩位小數位位數





小數點以下位數需要保留幾位就選幾位


尾數處理也要選擇


然後點選小數點以下位數右邊的公式編輯

if Right(ToText({P_GPS_App_Models_StockDownloadStockInOutLedgerReport.StockInNum},2),2) = "00" 

then
0
else if Right(ToText({P_GPS_App_Models_StockDownloadStockInOutLedgerReport.StockInNum},2),1) = "0"
then 
1
else
2