在Crystal Report中将货币换算为Word [英] Currency Conversion ToWords in Crystal Report

查看:75
本文介绍了在Crystal Report中将货币换算为Word的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用C#.net开发Windows应用程序...在那方面,我遇到了货币转换函数TOWORDS()的问题,如果货币低于100,000,则给出正确的值.如果货币高于100,000,则采用默认值美元格式.表示百万美元,但我正在向印度客户生成报告,如何使用自定义函数将货币转换为印度格式
例如:100,000(我正在获取:十万)
但是我想得到(一个缺乏)...我怎么得到这个...请帮助解决这个问题的方法

Hi,

am developing my Windows application using C#.net...In that,I have a problem with currency conversion function TOWORDS(), if the currency is below 100,000 is giving the correct.if the currency is above 100,000 then it is taking the default US $ format..means million,but i am generating report to indian Client,how to use a custom function to convert currency in indian format
ex: 100,000(i am getting : one hundread thousand)
but i want to get (one lack )...how i get this...plz help out of this

推荐答案

format..means百万,但我是生成报告给印度客户,如何使用自定义功能将货币转换为印度格式
例如:100,000(我正在获取:十万)
但是我想得到(一个不足)...我如何得到这个... plz的帮助
format..means million,but i am generating report to indian Client,how to use a custom function to convert currency in indian format
ex: 100,000(i am getting : one hundread thousand)
but i want to get (one lack )...how i get this...plz help out of this


通过这个-

将数字转换为英语和亚洲格式的单词


谢谢
Go through this-

Convert numbers to words in English and Asian format


Thanks,


最后,我得到了解决方案…….

创建新的公式字段..在其中粘贴以下代码...它的工作原理.

numbervar RmVal:= 0;
numbervar Amt:= 0;
numbervar pAmt:= 0;
stringvar InWords:=卢比";

Amt:=输入您的值; //25,12,000


如果Amt> 10000000然后RmVal:= truncate(Amt/10000000);
如果Amt = 10000000,则RmVal:= 1;

如果RmVal = 1,则
InWords:= InWords +" + towords(RmVal,0)+"crore"
其他
如果RmVal> 1然后InWords:= InWords +" + towords(RmVal,0)+"crores";


Amt:= Amt-Rmval * 10000000;

如果Amt> 100000然后RmVal:= truncate(Amt/100000);
如果Amt = 100000,则RmVal:= 1;

如果RmVal = 1,则
InWords:= InWords +" + towords(RmVal,0)+"lakhs"
其他
如果RmVal> 1然后InWords:= InWords +" + ToWords(RmVal,0)+"Lakhs";

Amt:= Amt-Rmval * 100000;

如果Amt> 0然后是InWords:= InWords +" + towords(truncate(Amt),0);

pAmt:=(Amt-truncate(Amt))* 100;

如果pAmt> 0,然后
InWords:= InWords +和" + towords(pAmt,0)+仅用于paisa"
其他
InWords:= InWords +"only";

大写(InWords)
Finally I get Solution for this....

Create New Formula Field..In that Paste the following Code...Its Works.

numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";

Amt := type your value ; // 25,12,000


if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;

if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";


Amt := Amt - Rmval * 10000000;

if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;

if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0) + "Lakhs";

Amt := Amt - Rmval * 100000;

if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);

pAmt := (Amt - truncate(Amt)) * 100;

if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
else
InWords := InWords + " only";

UPPERCASE(InWords)


这篇关于在Crystal Report中将货币换算为Word的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆