在水晶报告中将金额转换为单词



我正在制作水晶报告,有人可以指导我如何将货币转换为这种格式的单词吗? (1,502,000.50( 仅一百万五百二千奈拉和五十科博。我试过:

numberVar x := {@summAmt} - int ({@summAmt});
if x = 0 then 
propercase (toWords (int({@summAmt}),0)+ ' Naira Only')
else 
propercase (toWords (int({@summAmt}),0)+ ' Naira, and ' + toWords ((x * 100),0) + ' Kobo')

要解决此问题,您将需要 2 个公式; 创建我之前发布的一个,然后创建,然后使用以下代码创建另一个公式:

numberVar x := {@summAmt} - int ({@summAmt});
if x > 0 then 
replace ({@convertWords},"Hundred ","Hundred and " )
else
{@convertWords}

{@convertWords} 是我的第一个公式的名称,@summAmt是我正在转换的字段的名称。

最新更新