【问题标题】:Currency Problem With Crystal Report水晶报表的货币问题
【发布时间】:2011-06-19 16:35:13
【问题描述】:

您好,我在 asp.net 网站上开发了水晶报表 我想设置货币格式,如 1,20,000(印度货币),但现在货币采用我的服务器托管货币格式,我在印度公司工作,所以我有任何格式可以将印度格式的货币转换为水晶报告//

【问题讨论】:

    标签: crystal-reports


    【解决方案1】:
    -- You can use below said code to your report part;
    
    CStr({@FieldName}, "##,##,##,###.##")
    
    And you are working for Indian Company, you will needed in words also. To write in words, use below said code;
    
    numbervar RmVal:=0; 
    numbervar Amt:=0; 
    numbervar pAmt:=0; 
    stringvar InWords :="Rupees "; 
    
    Amt := {@FieldName}  ; 
    
    
    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"; 
    
            ProperCase(InWords) 
    

    【讨论】:

      猜你喜欢
      • 2010-09-22
      • 2010-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多