Please suggest solutiion for calling a plsql function in report

Hi,
I did a small project using forms and reports 6i. Now i prepared a repor that will calucalate the sum(expenditure)per report level. Now the problem is i want to print the sum which is in number form , in words. That is if the sum is 50000 then i want to print "fifty thousand". For this conversion from number to figure i wrote a small programme , which successfully compiled and created a function.
Now I want to create a field in the report and in which I want to call this plsql function and perform the number conversion of sum(expenditure)per report field. Please describe in detail how to make reference between these two fields i.e sum(expenditure)per report and field in which I want to run plsql code and thereby converting the sum into figures.
the programme i used to convert currency from number to words is please see link.http:/orafaq.com/scripts/cheqprint.txt
Thanks in advance
Prasanth a.s.

Hi,
If the amount does not exceed more than 5,373,484 then you can use the following method to print the number in words.
Test Db>Select to_char( to_date(5373484,'J'),'Jsp') from dual ;
TO_CHAR(TO_DATE(5373484,'J'),'JSP')
Five Million Three Hundred Seventy-Three Thousand Four Hundred Eighty-Four
There's no need to write DB function unless you are sure that the value can exceed 5373484.
You can do the following :
1. Create a Summary column on the report column on which you want the data summed - Report level or at any level required
2. Create a Formula Column - Report Level or any other level - Wherever required [ Same level as in Step 1]
3. The trigger text of this formula column would use the column which is summation of the Expenditure field column (Summary Column) and this function should return Varchar2
Declare
lSumInWords Varchar2(1000) := Null;
Begin
Select TO_CHAR(TO_DATE(:CS_1,'J'),'JSP')
Into lSumInWords
From dual;
Return (lSumInWords);
End;
3. In Your report layout, use this formula column for printing.
Good Luck.
-- Shailender Mehta --

Similar Messages

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

  • Why Apple does not provide for call block / blacklist function on iphone?

    If Apple frowns upon jailbreaking the iPhone, why not AT THE LEAST endorse and make available third-party application that can provide a decent call block / blacklist function (like the Call Blocker for BlackBerry)?
    Can an Apple representative provide feedback pls?
    [Most telcos do not provide call-screening as a value-add service. Even if they do, a more cost-effective method is still the better option.]

    Have you asked your service provider if they offer any call blocking service? I know here in the USA, AT&T does, although they do charge $4.99/month for the service (it is part of a parental control package that allows control of both numbers that can be blocked from calling you, and numbers that your iPhone can call to).
    On-phone black list apps typically work by using caller id info and looking it up against the apps own database of numbers you've entered. So your phone still rings at least once, as the phone needs to allow a brief connection for the app to get the caller id info before disconnecting a number flagged for blocking. There really is no way to truly block calls from the phone itself, you need your service provider to be on board with the idea, so they can dis-allow the call at the switch and truly block it from ever reaching your phone.

  • Please suggest Partition for following example urgent

    Hi all
    my table have one column Year
    I need to create 2 partition year_1,year_2 for year column but synario is
    If 2004 ,2005 2004 must go into year_2 and 2005 must go into year_1
    also for 2006 must go into year_1 and 2005 into year_2
    Please suggest type of partition if possible with example
    Regards

    > I need to create 2 partition year_1,year_2 for year column
    <snipped>
    An exceedingly bad idea to partition a date range like this - stuff some data into one partition and some other data into another partition, without any logical condition that governs what data must go into which partition.
    So do not create just two partitions. Decide on the partitioning strategy you want based on criteria such as:
    a) volume of data
    b) access to data (i.e. predicates used)
    c) data management requirements (e.g. removing or aging old data from the table)
    Satyaki's example shows you the basics of how this should be done. A partition by year. Or, monthly or even daily partitions. And possibly even sub-partitions.
    You will be achieving nothing in terms of performance or data management by trying to stuff date ranged data into two partitions as you are indicating.
    As for future yearly partitions? Create yearly partitions for the next 10 years. Or 20 years. Or 100 years. They will be empty. Small space footprint. Ready to be used.
    In this case there are relatively few (yearly) partitions - far less than having to deal with 1000's of daily partitions where it is often a better idea to automate adding of new partitions using a DBMS_JOB.

  • Siri does not work when used for calling a contact function

    Siri does not work when used for calling a contact function

    Very strange, try to turn off/on your iPhone. Or make a reset (home+power button)...
    If it continues try to restore it.

  • Transformation: Need for calling a custom function module on source system

    Hi Gurus,
    I need to use a custom FM residing on source system within the transformation to determine the type (e.g. posting type) of a document item. The logic is quite complex with many exceptions (many if statements) and 2 customizing & few transparent tables are in use as well in the FM.
    From my point of view, there are few options for achieving the outcome:
    1. Copy the FM logic 1:1 in transformation
    2. Transport the FM from ERP to BW system
    3. Source system delivers the info (e.g. with an extra field "posting_type")
    4. Access the FM directly via RFC/BAPI
    However, there are pros and cons for each of the alternatives:
    *Option 1*
    pros:
    cons: consistency problem, need for importing customizing tables & source tables, high maintenance effort
    *Option 2*
    pros: better consistency compared to Option 1
    cons: need for importing tables, administrative efforts
    *Option 3*
    pros: no logic is needed at BW side, no transformations means no impact on performance, high consistency, no administrative effort
    cons: structure in source system has to be changed, impact on historical records
    *Option 4*
    pros: best consistency (better than Option 3 as FM might change), no administrative effort
    cons: impact on performance during transformation
    Could you please verify my assumptions and give suggestions on solving the problem?
    Thanks a lot!
    Regards,
    Meng

    Hi Joon,
    According to me.
    If Historical data amount is so high, historical data is available in BW(at PSA level or acquisition layer or corporate memory layer) and headache to load history data(because of overload on ECC due to huge amount of data) from ECC then I will suggest combination of 3 and 4 steps.
    If fetching history data from ECC is not headache for you then go for step 3.
    Step 3 is most common approach in BW, which is easy for implementation and support.
    Regards,
    Ashish

  • Please suggest substitute for kensington trackball

            Kensington has apparently abandoned their expert mouse trackball (4 programmable
    keys and a ring surrounding a trackball) - it still works for Lion but you can't set
    functions such as "print" and "save" so it is basically useless. Contacting them
    is impossible - I've gotten 3 different answers.
           What would you suggest that would have this functionality?

    Before you give up on your Kensington trackball, have you tried their Trackball Works 1.1 driver?
    http://www.kensington.com/kensington/us/us/s/1550/softwaredrivers.aspx
    It works with Lion and gives you many of those types of commands; at least it does with the SlimBlade. I don't have the Expert Mouse any more to try.
    Regards.

  • Please suggest solution for deletion of  all rows in table at a time

    Suggest me pl/sql code for a push button in form to ‘delete entire rows’ in a table.
    BEGIN
    LOOP
    DELETE
    FROM mytable(say table name)
    WHERE ROWNUM < 20000;
    EXIT WHEN SQL%ROWCOUNT = 0;
    COMMIT;
    END LOOP;
    END;
    I wrote this code but not deleted .
    Execute immediate ‘truncate table <tablename>’; this code too not working.
    What my need is ‘ I don’t want to put entire block fields in the form, just I want to put a push button and when I pressed it must delete all rows in a particular table.
    That I want to delete all rows form builder runtime not by entering sql.8.0 and then there delete the rows.
    thanks in advance
    prasanth a.s.

    to delete all records in a table, if you want to get good performance, then use:
    FORMS_DDL('TRUNCATE TABLE your_table_name');
    It is better than use DELETE FROM TABLE_NAME. But if you have condition in where clause, then you have to use DELETE FROM ...

  • HT201304 Any one has tried to connect I pad to LCD tv??? Please suggest way for same....

    Can any one suggest how to connect iPad with LCD tv for see photos or using big screen...then iPad??
    Can you suggest how can be connected??

    Hi there.  I connect mine to my TV with the apple HDMI adapter, and it works perfectly.  great way to watch movies from itunes.

  • Please suggest measures for tempdb.

    Q1)
    I am using express advance version of sqlserver 2008 r2, is there any limitation of temp db , why i am asking is because rowversion uses it heavely.
    What i have seen is, transactional data read by this sanpshot isolation level transaction will be around 200 mb to 500 mb and it changes 10 to 50 mb of data. which will complet in few mints or seconds . but the stored proc  will be running
    continusally for 30 min to an hour ( it is sheduled on time basis ). and there is only one SP which will have snapshot isolation level transaction.
    yours sincerely.

    Hi,
    10 G restriction exists for Tempdb data file and log file combined.I have not tested this but I am aware about this.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Please, suggest app for minutes control

    I need an application por iphone 4 plus for minutes control
    thanks for your suggest!!
    Ricardo

    Do you mean phone minutes? If so, you need to contact your carrier to see if they can apply any restrictions to the account. There is nothing available for the iPhone itself.
    ~Lyssa

  • Please suggest forum for me

    can any final cut pro user direct me to a forum, anywhere on the web that i may find information on how i can convert a project created in final cut with .mov extension-file type, to play on a web site that only recognizes mpeg,mpg,avi,wma. I asked this question earlier and people were very curtious to give me suggestions, but nothing worked. I am wondering if i should find a file conversion forum. i am working with final cut pro 2 thank you.

    The Compressor forum may help: http://discussions.apple.com/forum.jspa?forumID=999
    But subquestion is correct; you'll need more specific information to get an accurate answer. I recommend contacting the web host's support to get the needed information.
    WMA = Windows Media Audio
    AVI = a container format which could contain any number of codecs
    MPEG = could be MPEG-1, MPEG-2 or MPEG-4 or any of the variations of each
    MPG = same as MPEG
    -DH

  • Please suggest driver for microsoft lifecam studio for to work with live stream procaster

    I have microsoft life cam studio using to broadcast live through live stream procastrer. I am using mac mini with mac os lion 64bit.But default driver for this studio cam is not supporting to go live with proper crop and quality settings. Can anyone provide driver for this camera ?

    Hi, no idea really, but perhaps see if this could work for what you want...
    http://www.google.com/url?q=http://www.bensoftware.com/securityspy/&sa=U&ei=QUGH T4z4K4WciQL436yGAw&ved=0CBEQFjAA&usg=AFQjCNEC9fzmWGOiPtM0kRHyzfST3Kh5jQ

  • Limitations on using SQL/PLSQL Functions in Reports 6i/10g

    Hi Gurus..
    We have limitation on using TRIM, Regular Expressions, CASE Operator, Sub-query in cursor in Reports 6i/10g..
    Could you please let us know all such limitations for Reports 6i/10g. Any reference document will be much more useful..
    Any help will be greatly appreciated...
    Thank You in Advance..
    gt1982

    There is no documentation. E.g. the Reports 6i documentation can't say that you cannot use regular expressions, simply because it just didn't exist at the time.
    The pl/sql engine in Forms and Reports is always behind on the database. You should put as much code as possible in database procedures and views if you want to make use of new (pl/)sql functionality.

  • Call plsql function from esb-xsl mapping

    Hi
    I want to call a plsql function that takes an inparameter from an xsl mapping file.
    I tried to use the orcl:query-database function for this, but i couldn't get it to work when I wanted to dynamically pass the value of the inparameter to the function taken from the XML file used as input in the xsl transformation:
    If I hardcode the parameter value like this, it works fine:
    orcl:query-database('select emx_parameters.get_parameter_value('DEADLINE') result from dual',false(),false(),'jdbc/DB')
    But if i dynamically want to assign the inparameter, it doesn't work for me:
    orcl:query-database('select emx_parameters.get_parameter_value('/Header/ParameterName') result from dual',false(),false(),'jdbc/DB')
    Maybe it has something to do with the ' signs, but I tried a lot of combinations it nothing worked for me.
    Has anyone any ideas how to do this?
    Thanks
    Kalle

    Hi
    If anyone is interested i managed to solve it this way:
    I build up the sql query string with xsl variables like this:
    <xsl:variable name="start">select emx_parameters.get_parameter_value('</xsl:variable>
    <xsl:variable name="param" select='/Header/ParameterName'/>
    <xsl:variable name="end">') result from dual</xsl:variable>
    <xsl:variable name="expr" select="concat($start,$param,$end)"/>
    And then I called the orcl:query-database method with the variable as in-parameter.
    orcl:query-database($expr,false(),false(),"jdbc/DB")
    Maybe there is another way, but this worked for me.
    //Kalle

Maybe you are looking for

  • I accidentally deleted the song in iTunes from my macbook, how can I get it back?

    I accidentally deleted the song in iTunes from my macbook, how can I get it back? Can I get it back from purchased order in iTunes store??

  • My *entire library* is suddenly gone except for one recently imported music bundle.

    a week ago i loaded/imported a large folder of music (gift with an e-book purchase) to my itunes music library. that went fine, but this morning i wanted to sync my ipod touch with itunes, and that recently imported content is *all that is there*. al

  • Mail randomly deleting stuff

    Lately I've had a lot of trouble with mail. It randomly backspaces when I type the letter L or an apostrophe (this does not happen when I am in any other application). I've been to the genius bar 3 times. They've checked for sticky keys and even inst

  • Enqueue and xmltype and PLS-00306 error

    I tried to create such a procedure but PL-SQL shows errors. PLS-00306 Incorrect number or types of arguments for call enqueue create or replace procedure enqueue_xmltype( queueName in varchar2,msgClob in CLOB) is msgProp dbms_aq.message_properties_t;

  • Volume as install disk for Guest Domain and Live Upgrade

    Hi Folks, I am new to LDOMs and have some questions - any pointers, examples would be much appreciated: (1) With support for volumes to be used as whole disks added in LDOM release 1.0.3, can we export a whole LUN under either VERITAS DMP or mpxio co