CASE function problem in forms

I am using the CASE function in View. Whenever i execute it using SQL plus it runs successfully. I have developed a form on this view and the form does not reflect the CASE function changes. Just an example i am using the CASE function to set the number format but it is not depicting on form.
SELECT (CASE when TO_NUMBER(123123.12/1000000) < 1 THEN TO_CHAR(TO_NUMBER(123123.12/1000000),'0.99999')
ELSE LTRIM(TO_CHAR(TO_NUMBER(123123.12/1000000),'999,999.999999')) END) as targetamount
FROM DUAL

This is not that diffucult.....I rememeber doing this in one of my forms....
I would have three content areas
ContentArea A (Portrait) linked to Subform A
ContentArea B (Landscape) linked to Subform B
ContentArea C (Portrait) linked to Subform C
Now I will set the Min, Max and Initial values for each of those Subform using Binding tab.
Then I will manage the page layout selection with each of those subforms using Object>>Pagination>>Place and link those to the Content area A B or C based on the layout they should go on. That should do the trick.
If this is not helpful just forward me a copy at n_varma(AT)lycos.com....I will try my best.
Good Luck,

Similar Messages

  • Is CASE function allowed in forms 6i???

    Hi,
    Is CASE function allowed in forms 6i???
    Thanks
    ESL

    Hi!
    The case statement come first with Oracle Database 9i.
    In Forms 6i it will not work.
    Regards

  • RANK() function problem in Form 10g

    I am using form 10g R2. I wrote codes inside a trigger of a button to select from one table, named test. The code is as follows:
    select mm,pp,rr from test. The form can compile this code.
    But when I write teh code select mm,pp, rank() over(order by pp desc) rr from test, the form can not compile. Itshows the following error:
    Encountered the sysmbol "(" when expecting one of the following:
    , from into bulk.
    The table has only one record. It works in SQL environment but the form can not compile this RANK() OVER() function.
    Do you have any idea to use RANK() OVER() function in Form 10g?

    Some analytical functions do not work in client-side sql in forms, you'll have to encapsulate your logic in the database.

  • Case statement problems in oracle forms 6i

    Hello,
    Any one can help me that how to use case statment in Oracle forms 6i.
    i have read one thread and there was no proper solution so could any one please let me know to use case statement.
    Please also let me know which category i should search for FORMS 6i.
    when i'm using below code with cursor then i'm getting error 103
    database:=11g
    application := forms 6i
    operating system:= win Xp
    code is given below :-
    cursor c1 is
    select nc.nomenclature_id,
    nvl(nc.category_value, 0) master,
    nvl(nc2.category_value, 0) case,
    nvl(nc3.category_value, 0) bundle,
    case
    when nvl(nc.category_value, 0) > 0 and
    nvl(nc2.category_value, 0) > 0 and
    nvl(nc3.category_value, 0) > 0 then
    'A' --All packouts Master, Case, Bundle
    when nvl(nc.category_value, 0) > 0 and
    nvl(nc2.category_value, 0) > 0 and
    nvl(nc3.category_value, 0) = 0 then
    'B' --Both Master and Case
    when nvl(nc2.category_value, 0) = 0 and
    nvl(nc3.category_value, 0) = 0 then
    'C' --Master Case Only
    else
    'N'
    end code
    from nomn_category nc, --master case
    (select nc2.nomenclature_id,
    nc2.category_value
    from nomn_category nc2
    where nc2.category_id = '230732') nc2,
    (select nc3.nomenclature_id,
    nc3.category_value
    from nomn_category nc3
    where nc3.category_id = '236566') nc3
    Edited by: Rahul on Feb 3, 2012 7:18 PM
    Edited by: Rahul on Feb 3, 2012 7:20 PM

    hello Andreas,
    It is ok but i dont have to use view there.
    i need to use without view, because this code has to be use in FORMS6i.
    But Forms6i doesn't support to case function. i'm newbie in Forms.
    If you can convert to below bold one portion(case) into decode then please help me or
    if you have any idea about Forms6i then please send me any link where is given explanation about excel report that how to make excel report through Forms6i step by step and that excel report should be generate on any dynamic path which is given by user:-
    cursor c1 is
    select nc.nomenclature_id,
    nvl(nc.category_value, 0) master,
    nvl(nc2.category_value, 0) case,
    nvl(nc3.category_value, 0) bundle,
    case
    when nvl(nc.category_value, 0) > 0 and
    nvl(nc2.category_value, 0) > 0 and
    nvl(nc3.category_value, 0) > 0 then
    *'A'*
    when nvl(nc.category_value, 0) > 0 and
    nvl(nc2.category_value, 0) > 0 and
    nvl(nc3.category_value, 0) = 0 then
    *'B' --Both Master and Case*
    when nvl(nc2.category_value, 0) = 0 and
    nvl(nc3.category_value, 0) = 0 then
    *'C'*
    else
    *'N'*
    end "code"
    from nomn_category nc,
    (select nc2.nomenclature_id,
    nc2.category_value
    from nomn_category nc2
    where nc2.category_id = '230732') nc2,
    (select nc3.nomenclature_id,
    nc3.category_value
    from nomn_category nc3
    where nc3.category_id = '236566') nc3
    thanks

  • What is the difference betwee decode & case function

    Hi
    What is the difference betwee decode & case function
    1.decode can't used in pl/sql 1) case can be user
    2.in decode we can't use (>,<,>=) 2) we can use
    any other do u have....
    thanks in advance....

    DECODE works with expressions which are scalar values.
    CASE can work with predicates and subqueries in searchable form.
    There is one more Important difference between CASE and DECODE
    DECODE can be used Only inside SQL statement....
    But CASE can be used any where even as a parameter of a function/procedure
    Eg:-
    SQL> create or replace procedure pro_01(n number) is
      2  begin
      3  dbms_output.put_line(' The number  = '||n);
      4  End;
      5  /
    Procedure created.
    SQL> set serverout on
    SQL> var a varchar2(5);
    SQL> Begin
      2  :a := 'ONE';
      3  End;
      4  /
    PL/SQL procedure successfully completed.
    SQL> Begin
      2   pro_01(Decode(:a,'ONE',1,0));
      3  End;
      4  /
    pro_01(Decode(:a,'ONE',1,0));
    ERROR at line 2:
    ORA-06550: line 2, column 9:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    SQL> Begin
      2    pro_01(case :a when 'ONE' then 1 else 0 end);
      3  End;
      4  /
    The number  = 1
    PL/SQL procedure successfully completed.Message was edited by:
    Avi
    Message was edited by:
    Avi

  • Font size issue with the email functionality of infopath form

    Hi,
    We have a SharePoint list created and customised the form to send the form via email using email functionality in infopath form.
    We have made the font size of the form fields( rich text box) to 11. But it is showing as 10 in email. Also for a text box we set the font size to 14. But it is 13.5 in the email.
    Could anyone please let me know how to fix this issue?

    http://social.technet.microsoft.com/Forums/sharepoint/en-US/afbd9fc3-b8d3-4ef9-a8bf-9cb136d12039/formatting-problem-with-email-from-an-browser-enabled-infopath-2010-form-in-sharepoint-2010?forum=sharepointcustomizationprevious
    Yes, this is normal. Forms Services has to convert the form to an aspx page, and things get lost in translation when this gets submitted via email.  My workaround has always been to set static widths to columns/controls, but you said that didn't work
    for you?  It's always worked for me.
    https://go4answers.webhost4life.com/Example/infopath-send-form-email-162481.aspx
    http://www.formotus.com/15413/blog-infopath/making-the-most-of-email-submit-with-infopath-and-formotus-forms

  • CASE function is not working

    Hi,
    I want to use the CASE function in a sql statement used at form level but it's not working. I can't compile the form. I am using developer 6i at font end and Oracle 10g database at back end. Is it possible to use case function at form level sql statement. If so then please help me about it.
    Best Regards

    Forms has it's own PL/SQL engine, and in Forms 6i it's version 8 where no CASE was available. So if you want to use CASE you'll have to use a view or put your logic in a stored procedure.

  • Java Bean Function problem

    Hi All .
    i just embeded a java bean into oracle forms it appear succesfully on the canvas now i want to execute the following function but unable to do so. Can u please explain me what i have to type where requested to call following function.
    FUNCTION getDate(
    obj ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT;
    and the code i have on custom-trigger is
    declare
    newdate date;     
    begin
         newdate := JCALENDAR.getdate("WHAT to write here");
         if (newdate is not null) then
              :vhead.DTv := newdate;
         end if;
    end;
    Thanks in Advance
    Message was edited by:
    Fiz Dosani

    Did you use the Java Importer to import the classes ?
    >>yes i do
    and i am also using a bean area & while looking your reply at the following thread i try to use fbean package for calling a function but the problem is that the getdate function return date and i didnot find invoke_date precedure in fbean package
    Re: How to call java function in Oracle forms?

  • Case-Sensitive problem while compiling in Linux

    Hi All,
    We have around 100 forms developed in windows platform. The forms use program units from plls. Compiling against windows do not have any problem. But when they are compiled in linux environment, we get error like frm-18108: unable to load form objects.
    Also the program units of the pll's are not referred correctly, since the declaration is in upper case and the calling in the other forms is in other cases.
    Is there any way to by-pass this case-sensitive problem, other than making them even in case, in the forms and libraries.
    Thanks
    Gopal

    Hi Francois,
    I had already tried with having all combinations of file name but still I am getting
    error
    "Compilation error on procedure CG$KEY_STARTUP:
    PL/SQL ERROR 201 at line 9, column 1
    identifier 'SET_MDI_TITLE' must be declared
    PL/SQL ERROR 0 at line 9, column 1
    Statement ignored".
    The set_mdi_title PU is defined in PLL and the library is attached to the form. When I compile the form using f90gen, I am getting the above error.
    Please suggest.
    Thanks Gopal

  • Common SAP MM Functional problems

    Fellows
    Is there anyone who can explain some common SAP MM daily functional problems. im junior consultant and want to be prepared for interviews. you may just state them in point form briefly.
    thanks
    rash

    Common Issue
    1)Vendor is not created for Purchasing Organisation XXXX.
    2)Though Vendor Master is Flag for Deletion ,Vendor is shows at the time of PO Creation.
    3)How to extend the materials for another storage location
    4)How to Create the PO for Different Currencies.
    5)While Posting The Doc . Error Occure,1) Account Determination for Entry 1000 BSV _ _ not Posssible.2)  Account Determination for Entry 1000 FRL _ _ not Posssible.
    6)Not Authorisation for Movt Type ......,Transaction Code......
    7) Account Determenation for transaction ....  Cost center ...does not maintain.
    8)While Creation of GR -Authorisation missing for Company Code 0000 Asset Class XXXX,
    9)While Removing The Stock of material by Cancelling the Goods Receipt Doc.Error occur that Stock Qty difficial by xx No.
    10)While GR Cancellation error occure that document does not contain any selected item.
    11)While Creating Service Entry Sheet Error occured that Qty entered  exceeded by Qty in PO
    12)While cancelling the matl.Doc Error occure that matl is deficit of sales ordr stock.
    13) Error-Tax code does not Exist while creating Miro
    14)TDS Amount is not Captured at Miro entry.
    15)While Miro error occure that No suitable item found for Purchase Order.
    16)User ID gets Blocked due to wrong Password entered more than 3 times.
    18)Error-Gl account does not created for Chart of account XXXX while Miro
    19)In Purchase Order Service tax is 12.24 % and at Bill service tax is 10.5 .How to adjust it and How to cancell Wrong Miro
    20)Stock Statement not matched Value still lying into Stock A/c
    Rewards if Helpful...
    Regards
    Sanjay L

  • Subtotal issue when subtotaling on a calc field built using CASE function

    Okay, I hpe I can explain this well. May be possible that this is something cannot handle in Discoverer. I am using Discoverer Plus to develop a new workbook - cross project expenditure inquiry. A requirement is to not allow a worksheet user to see labor cost (since possible to figure out someone's salary) amount unless they are allowed to view labor cost. I have a function that returns a Y/N value that tells me if they can view labor cost. That works out just fine. So what I am doing is taking my database cost column (which is defined as Number(22,5) in the Oracle table. I create a new calculated column, basically like this -
    CASE WHEN expenditure type <> LABOR THEN cost WHEN view labor cost = 'Y' THEN cost ELSE NULL END.
    That calculated column is working just fine. I am seeing my desired results in that column. Okay so far.
    Next, the users want subtotals by project organization and project. So I created a new total. When I did that, my subtotal row amount is blank.
    Okay, I have seen this happen with NULLS before. Like in the gl_je_lines tables, where the accounted_Dr and accounted_Cr may be null, and have to do a NVL function to convert the null to 0 and allow me to subtotal on the column in a Discoverer workbook.
    So I tried creating a second calculation -
    NVL(Cost,0)
    So I return the cost if not null, otherwise I return 0. Second calc column results look okay.
    Now I did a subtotal on the second calculation. Oops. Wrong result. Amount is shown as 0.
    For grins, I went back to my CASE statement on my first calculation and changed the ELSE condtion from NULL to 0. When I did that, the subtotal on that column changes from a blank (Null) value to a 0 value. Well, better, but still just like my second calculation subtotal.
    Obviously the users have the option to export to Excel and subtotal in Excel.
    Does anyone know of a way to get a good subtotal in this kind of situation, where I am attempting to subtotal on a calculated field that is built on a CASE function? Or am I out of luck when it comes to Discoverer?
    John Dickey

    Okay, I did find a workaround, though I do not understand why the workaround works, but why the way I first tried to get a subtotal did not work. What I did is that I had to go to Discoverer Administrator. I picked my folder and did an Insert/Item. I created my new item building the same CASE statement that I used in my worksheet to create a new calculation. I then closed Discoverer Plus and reopened Discoverer Plus. Opened my worksheet. Edited the worksheet and brought in my new (derived) item from my folder. Then I created my subtotals for this secured cost amount. Voila. I get a number now, and the subtotal amount appears to be correct (still testing/verifying, but looks okay so far). So I deleted my subtotals on my calculated column and then deleted the calculation, to get that stuff out of the report. Sure would be nice if there was documentation in the Discoverer manuals about this.
    John Dickey

  • How can i add a picture upload function to my forms

    hi all,
    i designed a forum for a survey , but i need a function to upload a picture to the form then only the meaning of the survey fullfilled , any body know how to put a "Insert image function to my forms .
    please let me know
    saji

    Hi;
    There is an "Attachment" field that allows a user to upload an attachment (Image, PDF, document etc).  It is one of the fields on the form fields toolbar:
    Make sure you are in "Web View" as opposed to "Page View" on the Design tab authoring your form to add the attachment field, the "View" setting is under the View menu and also at the bottom right corner of the page.
    Here is a tutorial on the attachment feature: http://forums.adobe.com/docs/DOC-1413
    Thanks,
    Josh

  • How to use a function PIPELINED in Forms 10g?

    Hi guys,
    When I tried to use a function PIPELINED in Forms, I received the message:
    - PL/SQL function called from SQL must return value of legal SQL Type
    FOR rec_dev IN (SELECT *
    FROM TABLE(p1196.f_executa('01-aug-2010', -- pdDataInicial
    '30-aug-2010', -- pdDataFinal
    5, -- pnCodAdm
    NULL, -- pnCdsCod
    NULL, -- pnAdmsSrvCod
    NULL, -- pnAcao
    NULL)))
    LOOP
    vnQtdeEstornos := vnQtdeEstornos + rec_dev.qtde_estornos;
    vnVlrTotalCredito := vnVlrTotalCredito + rec_dev.valor_credito;
    END LOOP;
    Can anyone help me?
    Cris

    You can't. One option would be to wrap your pipelined function in a view, or you could write a stored procedure which returns a strong ref cursor instead.
    cheers

  • How to use, Case function and Filter in Column Formula?

    Hello All,
    I am using case function and also would like to filter value to populate.
    Below is showing error :
    case
    when '@{Time}' = 'Year' then "Time"."Fiscal Year"
    when '@{Time}' = 'Quarter' then "Time"."Fiscal Quarter"
    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')
    else ifnull('@{Time}','Selection Failed') end
    Thanks, AK

    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')I dont think Filter this works here or any other data types except number.
    Try to use option Column's->Filter->Advanced->Convert this filter to SQL
    If helps mark

  • Function keys in Forms 9i

    Function keys in Forms 9i
    are not working with me..any possible reasons?

    Thanx for your help.
    it was my mistake I thought F9 is a built-in function key for LOV like it was in 6i
    but I have another question please in this area
    suppose I want to add F9 function key to call LOVs
    I understod that i shoud add this line to fmrweb.res
    120 : 0 : "F9" : ??? : "List of values"
    what should I put instead of the question marks?
    what is Forms function number? how can i find it? and how can i modify it?
    thanx again.

Maybe you are looking for