簡體   English   中英

如何使用Powerbuilder上的顯示值進行計算

[英]How to use the displayed value on powerbuilder for computation

我只想問一下如何解決我的問題。 在我的報告窗口中,有2個計算字段:1.一個用於計算小數的字段,我只將其顯示為兩個小數(顯示沒有問題)。 2.在另一個計算字段上,我使用第一個計算字段的結果乘以某個數字。 問題出在這里,因為要相乘的值不是從第一個字段顯示的值。 相反,它將使用全部金額。

Scenario:
2,055,232.135 is the computed value and id displays 2,055,232.14 which is good.
But if i multiply it to 9 (2055232.135 * 9), the result is 18,497,089.215 which will be displayed as 18,497,089.22
The problem is I want that the displayed value (2,055,232.14) to be multiplied to 9 (2055232.14 * 9) which will then results to 18,497,089.26

我只想獲得計算字段的第二個值,以便如果用戶為它計算,它將相等。

可以在計算字段中使用以下解決方案:

String( Truncate( 2055232.135 * 9, 2), "#,##0.00")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM