转换成单词

扫码查看
本文介绍了转换成单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下代码在Crystal Report中以字为单位打印金额.当我将2077676转换为单词时,这将返回200万,七十六,一百六十六.但我要二十世纪七十六六十七十六
.我该怎么做



Iam using the below code to print amount in words in crystal report. When i convert 2077676 to words this return TWO MILLION SEVENTY SEVEN THOUSAND SIX HUNDRED SEVENTY SIX. But I want TWENTY LAC SEVENTY SEVEN THOUSAND SIX HUNDRED SEVENTY SIX
.How can i do this



dim mIntPart as number, mDecPart as number
dim mAmtInWords as string
mintpart=int({qryFilingRebateClaim.InvExc_DutyRate})
mDecpart = {qryFilingRebateClaim.InvExc_DutyRate} - int({qryFilingRebateClaim.InvExc_DutyRate})
mAmtInWords=Towords(mIntPart)
mAmtInWords=left(mAmtInWords,instr(mAmtInWords," and"))
if mDecpart <> 0 then
    mAmtInWords=mAmtInWords + " POINT " + Towords(mDecpart*10)
    mAmtInWords=left(mAmtInWords,instr(mAmtInWords," and"))
end if
mAmtInWords = ucase(mAmtInWords) + " ONLY"
formula=mAmtInWords

推荐答案


这篇关于转换成单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:38
查看更多