Convert numbers to Indian Rupees format in Oracle Forms / Reports.

Create the below mention function in Oracle Forms / Reports and call it with passing a number parameter.

FUNCTION INR_words( p_number In number, vFrDec varchar2 Default 'Paisa Only')
RETURN varchar2 As
TYPE myArray Is Table Of varchar2(255);     
TYPE myArray2 Is Table Of varchar2(255);
l_str    myArray := myArray( '',
                   ' Thousand ', ' Lac ',
                   ' Crore ', ' Arab ',
                   ' Kharab ', ' quintillion ',
                   ' Sextillion ', ' Septillion ',
                   ' Octillion ', ' Nonillion ',
                   ' Decillion ', ' Undecillion ',
                   ' Duodecillion ' );
l_str2 myArray2 := myArray2('Rs Paisa', '$ Pany');
    l_num   varchar2(50) Default Trunc( p_number );
    l_dec   varchar2(50) Default Substr(To_Char(p_number - Trunc(p_number), '.99'),2);
    l_return varchar2(4000);
    j number := 3;
BEGIN
    For i In 1 .. l_str.Count
    LOOP
        EXIT When l_num Is Null;
        IF ( Substr(l_num, Length(l_num)-(j-1), j) <> 0 ) Then
           l_return := To_Char(To_Date(
                            Substr(l_num, Length(l_num)-(j-1), j),'J' ), 'Jsp' ) || l_str(i) || l_return;
        END IF;
        l_num := Substr( l_num, 1, Length(l_num)-j );
        j:=2;
    END LOOP;
    IF l_dec > 0 Then
        l_return := rtrim(l_return) || ' and ' || rtrim(inr_words(Substr(l_dec,2), Null)) || ' ' || rtrim(Initcap(vFrdec));
    END IF;
    RETURN Replace(l_return, '-', ' ');
END;

Number To Indian Rupee Words in Oracle Forms / Reports的更多相关文章

  1. Find Current Job Openings For Oracle Forms & Reports

    Oracle Form & Reports developer jobs are always in demand, candidates who have Oracle D2k, Oracl ...

  2. How To Install Oracle Forms 12c On Windows 7

    Below is the step by step guide to install Oracle Forms 12c on Windows 7. To install Oracle Forms 12 ...

  3. Displaying Window In Center In Oracle Forms 6i

    Center window automatically  in Oracle Forms 6i, use the following procedure by passing window name ...

  4. Adding List Item Element At Runtime In Oracle Forms

    Add combo list / drop down list item element at runtime in Oracle forms.SyntaxPROCEDURE ADD_LIST_ELE ...

  5. Populating Tree Item With Record Group In Oracle Forms

    The below plsql program unit could be used in a WHEN-NEW-FORM-INSTANCE trigger to initially populate ...

  6. Determining Current Block and Current Item in Oracle Forms

    SYSTEM.CURSOR_BLOCK Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system varia ...

  7. An Example of On-Error Trigger in Oracle Forms

    I wrote this trigger around 4 years ago to handle errors in an application based on Oracle Forms 6i. ...

  8. Pre-Update and Pre-Insert Trigger Examples For Oracle Forms

    See also: Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle FormsPre-Update Fires dur ...

  9. Checking For User Permissions Before Updating or Inserting The Records in Oracle Forms

    Suppose you want to check the user permissions on inserting or updating the records in Oracle Forms, ...

随机推荐

  1. Server.UrlEncode与Server.UrlDecode(url传递中文的解决方案)

    1.设置web.config文件.<system.web> ...... <globalization requestEncoding="gb2312" resp ...

  2. 【iCore3 双核心板_ uC/OS-III】例程三:任务的挂起与恢复

    实验指导书及代码包下载: http://pan.baidu.com/s/1jIctRVo iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  3. [IT新应用]如何用好搜索引擎学习英语

    用谷歌可以学习英语,用必应也可以的. 输入如下地址:global.bing.com,如果是中文界面,就单击顶部右侧“Switch to Bing in English”. 这个界面有很多英文原版的时事 ...

  4. ADB工具和手机抓包方法介绍

    Android抓包方法 工具包内容如下:(下载地址:http://download.csdn.net/download/yezhaohui2011/8368061) adb ——谷歌提供的安卓远程调试 ...

  5. 图文详解MFC程序设置菜单快捷键

    原来觉得添加个快捷键就只要几分钟,上网搜索文章都写得很模糊, 只有这边文章不错. http://www.cplusplus.me/1263.html http://blog.sina.com.cn/s ...

  6. C# base64编码的文本与图片互转

    /// <summary> /// base64编码的文本转为图片 /// </summary> /// <param name="txtFilePath&qu ...

  7. 【Android测试】【第十二节】Uiautomator——API详解

    ◆版权声明:本文出自carter_dream的博客,转载必须注明出处. 转载请注明出处:http://www.cnblogs.com/by-dream/p/4921701.html 简单的例子 以一个 ...

  8. win7系统如何安装SQL Server 2005

    Microsoft Windows 7 旗舰版(32位) SQL Server 2005 简体中文开发板 方法/步骤   1 首先为了保证数据库的顺利安装,先启用IIS服务吧!Win7比XP好的一点是 ...

  9. GitLab + Jenkins + Docker + Kubernetes。

    目前方案是GitLab + Jenkins + Docker + Kubernetes. 方案的工作流程如下:首先,开发人员提交代码代码提交:随后,GitLab 会自动触发Jenkins job,Je ...

  10. MVC 区域功能

    因为MVC项目是要求都放在固定的文件夹,所以,当项目大的时候,会很不方便管理,所以微软引入的区域的功能 使用方法: 在项目上右击--添加--区域 就会出现Areas的文件夹,里面就是子MVC 渲染: ...