How to save formula items in oracle forms?

Dear All........
I am nw in this forrum, can anybody plz tell me how to save forumula items in database, I also make that fields as a database field but it is not save in database. plz tell me. thx.

Dear!
Steps to take formula column value into database field, follow following steps:
1. Draw a text field named "Formula_Cell"and set its properties which you want for formula. Now, goto its "Database" property set to "No".
Now, goto its "Canvas" Property set to "Null".
2. Now, in Pre-Insert or Pre-Update trigger use following code:
Suppose database field name is AMOUNT then:
:AMOUNT := :FORMULA_CELL;
If you want to mension block names with this then you may do.
Remeber, Formula Column's property of Database must be set to No.
Now, try to save I hope you will got a good solution...

Similar Messages

  • How to Save a File in Oracle Forms 6 ?

    Dear All,
    I am using Oracle Forms 6. I need to save a file in .lst format.
    I am using,
    flnm:=get_file_name('E:\',file_filter=>'Text Files(*.lst|*.lst|');
    I f I use this, It prompts me to save the file. I want to save it automatically without asking me to enter the file name. We can get file name too from the above syntax
    flnm:=get_file_name('E:\','Test',file_filter=>'Text Files(*.lst|*.lst|');
    But i dont want the system to prompt me to save manually. It must be saved in the proper location as mentioned.
    Advance thanks for all.
    Kindly help me to overcome this issue

    Here's an example of a way to write out a file which writes out data from a particular block. The field names are hard coded so need to
    be customized:
    /* write out data as tab delimited file for import into
    excel etc */
    function write_file (myfile in varchar2) return varchar2 IS
      out_file          text_io.file_type;
      item_name varchar2(32);
      errnum number := ERROR_CODE;
      errtxt varchar2(80) := ERROR_TEXT;
      myblock varchar2(32) := 'MY_BLOCK';
      addrno integer := 0;
    BEGIN
      go_block(myblock);
      go_record(1);
      out_file := text_io.fopen(myfile,'w');
    /* output field header for excel or word */
      text_io.putf(out_file,'%s\n', 'notes' || chr(9) || 'subR' || chr(9)||'X' || 'someid' || chr(9)  ||
        'title' ||chr(9)||
            'first_name'||chr(9)||'last_name'||chr(9)||
          'home_address'||chr(9)||'home_city'||chr(9)||'home_state'||chr(9)||'home_zip');
      LOOP
            if (addrno > 0) then
                   text_io.putf(out_file,'\n');
            end if;
            addrno := addrno + 1;
            text_io.putf(out_file,'%s',:MY_BLOCK.some_notes || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.sub_ripple || chr(9));
            text_io.putf(out_file,'%s','X' || :MY_BLOCK.someid || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.title || chr(9) || :MY_BLOCK.first_name
                            || chr(9) || :MY_BLOCK.last_name || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_address || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_city || chr(9) || :MY_BLOCK.home_state ||
               chr(9) || :MY_BLOCK.home_zip);
            IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
             EXIT;
         END IF;
         NEXT_RECORD;
      END LOOP;
    text_io.fclose (out_file);
    return 'Y';
       exception
         when others then
             message ('ERROR write_file '|| myfile || ' ' || :system.cursor_block || ' '
             || :system.cursor_record || ' ' ||:system.cursor_field || ' '
              || errnum || ' ' || errtxt);
             bell;
             synchronize;
             return 'N';
    END;

  • How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods

    Hi All,
    How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods.
    This is a enhancement requirement.
    When ever user enter value in field 1 then automatically cursor should go to next field.

    Hello Bobb,
    You can create a trigger(when-list-changed) for each list item where you could:
    1.recreate the record groups and then use POPULATE_LIST so you can hide the selected values. In forms builder online help there are some good examples about create record groups dynamically.
    or
    2.you can perform a validation instead of hiding the selected values. If the values is already selected the display a message 'Value already selected....'
    Second option is much faster(only an 'if clause')
    Hope this helps.
    Regards,
    Alex

  • How to disable copy option for a text item in oracle forms

    Hello experts,
                  I am using oracle forms 11g with weblogic server 10.3.5 at windows7.I have a text item in my oracle form and I have to disable to being copy from a text item in oracle forms.Actually I have to make two text item.First text item to type a password and another text item is also to type password.Here I want that the data from first text item should not be copy through the use of mouse or keyboard shortcut key.
    thank you
    regards
    aaditya

    Thank You To reply, Actually doing so as you said,My problem would not be solved.This would hide data in text item than I will not be able to copy that but in my case the data should not be concealed.Actually I have to make a Form to  User registration and here is a strictly boundation to have a right email address of user.There would two text items for this purpose as: N_User_Email------> to type email address in text item.Here user would not be able to copy text written from N_User_Email R_User_Email  ------> to type email address again as in N_User_Email.

  • How to change image resolution in oracle forms.

    Hi Experts,
    I am working on oracle forms 10g (Windows7 OS). Can we get the image resolution of an image item in oracle forms? Can we resize the image in terms of resolution?
    I have a requirement where user can upload only 1280x720 size images. Either i have to validate the image resolution and give them a message saying 'Only 1280x720 size images are allowed' or simply i have to convert the image to be upload to 1280x720 size and save in the database. If someone could give the solution for the above problem that would be very much appreciated.
    Thanks,
    Pramod SR

    1. You need to resample.
    2. You can automate the process.
    1.
    Open one of the images.
    Go to Image > Image Size
    Set the units to Percent (100)
    Change the resolution to 300 ppi (not cm!)
    Make sure Resample is checked
    2. automation
    Test the above steps to make sure it works.
    Record the steps as an action.
    Make a droplet from the action.
    Drag the folder with the images to the droplet.

  • How can I code this in Oracle Forms?

    I have a master-detail form. In the detail block, I have several records. Here is my name table.
    ID Name_Type Name
    1 old Mike
    2 Current John
    3 old Peter
    4 old Andrew
    I would like to create a button trigger which shall perform the following:
    1) insert a record into database with a copy of current value. In the above case it will insert create a record for John as name_type = 'OLD'. So we have total of 5 records. Commit the transaction.
    2) Scroll through my detail records (5) and go to one specific record and erase the values from it. In the above case, it should find John's record with name_type = 'Current' and erase John from it.
    How can I accomplish this in Oracle forms using a button-pressed trigger?

    Hi,
    Simple, using current values you can create new id , 'old' and name so oracle will create record, now refresh block, next using next_record in loop you can find record,erase one and refresh block.
    Adinath Kamode

  • How to use Java Beans in Oracle Forms 11g at 64 bit windows7

    Hello Experts,
                  I am using Oracle forms 11.1.2.2.0 with weblogic 10.3.6 generic at windows 7 64 bit.
    My java version is jdk1.7.0_51.
    Now I have a htmlbutton.jar (which is for bean item in oracle form and this jar file works well for oracle forms 11g 32 bit windows 7 environment).
    I have takken steps:
    1:-Put jar file in home\java folder.
    2:-add this jar file into archive in formsweb.cfg.
    3:-Add this this jar file(which is in my home- java folder) in form_class path in registry.
    Now when I try to locate this jar file in my oracle form.There is no such jar file.what are the steps to use this jar file in oracle forms bean item.
    Please told me what is wrong here.
    thank you
    regards
    aaditya.

    It is unclear where you are having a problem.  Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
    Also be aware that you will need to sign your jar and include some new manifest entries.  Refer to the Java 7u51 documentation and blogs that discuss the changes.
    https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html

  • How to use unicode fonts in Oracle forms 10g?

    Hi I am working in forms 10g for quite a long time, the software that I have developed so far are all in English language. Now I have requirements to use Bengali Fonts in Forms 10g. I am facing difficulties doing that. Please reply with help. Thanks
    Hasan Al Mamun

    Check this forum post (though that is for 6i, it would be of helpful for you)
    How to use unicode fonts in Oracle forms 10g?
    -Arun

  • How to invoke crystal reports from Oracle forms 11g R2 along with passing p

    How to invoke crystal reports from Oracle forms 11g R2 along with passing parameter to it.
    how to pass parameters to crystal report, please help.

    how to pass parameters to crystal report, please help.This would entirely depend on crystal reports and you might find informations on crystal reports related communities more likely...I for one have seen crystal reports the last time about 12 years ago. And even back then I simply acknowledged it's existence instead of working with it.
    Maybe crystal reports can be invoked via a URL call which would make it simple as you'd need simply build an URL and show the report using web.show_document. But that's pure speculation. Also you might not be the first with this requirement, so the solution to your problem might be right under your nose and just a little google search away ;)
    cheers

  • How to run others application in Oracle Forms on the web version?

    How to run others application in Oracle Forms on the web version?

    Pang,
    guess that you want to start client side programs from Forms on the Web. There is a sample on OTN (host bean) that allow you to acces sthe client and start executables.
    Frank

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • How to validate a text item/display item in Oracle forms 9i?

    Hello Everyone,
    I have a form in which we have to type in a product_id as shown below in the screenshot. And when we type in, it has to get validated.
    If it is valid then ok, else display a message saying not valid.
    How do we achieve it on a text box/diaply item in the form shown below.
    Any kind of help would be really appreciated.
    Thanks in advance,
    Vishal

    Just create a when-validate-item trigger for that text item and write the code inside to validate it.
    Hope it helps.
    Navnit

  • How to make list item as text item  in oracle forms 6i

    Hello all,
    I created one form with one list item named "Country".. This list item shows country name for the particular employee in the employee table.I created this list item as database field. In the enter query mode i search an employee , This should act as item text.. Suppose i want to add an employee in enter query mode then i fill all the necessary fields,and
    when i click "country" list item it should display all the country names from "country_tab" table..So based on the situation
    this should act as list item and item text.. Can i Do this ?.. Pls help me.

    hai Andreas Weiden,
    I simply explain my requirement:
    I want to insert data and quering data by using single form...So, I created one form with data block. This form created from employee table.I have one text item in this form named country.This is database item.
    Ok ,Now the actual problem comes.I press "Enter query" in tools menu,Then enter one employee number in employee_no field.after i press
    Execute query In tools menu. It shows all the details corresponding to that employee..
    Note: here "country" text item also shows employees country.
    Right, Now i have another requirement. In the same form I want to insert a new employee. For that
    I planed to changes country text to list item [ because when  insert i can easily pick up one country .it
    reduces typing work ] . I have another table "COUNTRY". Using this table, i should populate country list item..
    So, the country item should act as both text item [When quering] as well as list item [ When inserting ]
    Is there any idea ti do this ?
    If this not possible then what is the alternative ?
    Pls suggest me..

  • Problem with List Item in oracle forms

    Hello Experts,        
                         I am new in oracle forms and i am using oracle forms 11g with weblogic 10.3.5 at windows 7.
    I have 3 database tables say(tbl_city,tbl_state,tbl_address).
    tbl_city
    C_ID
    C_name
    S_ID
    0
    None
    0
    1
    XYZ
    1
    2
    AS
    2
    3
    AXD
    2
      tbl_state
    ID
    s_ID
    S_Name
    0
    None
    1
    XY
    2
    ASD
    tbl_address
    A_ID
    A_Street
    S_ID
    C_ID
    1
    ABC
    1
    1
    Now I have made an oracle form having data block tbl_address with base table name tbl_address. In the form there are two list: one(list_state) for State_Name & State_ID and another(list_city) for City Name & C_ID display.
    Here I want when I set State_name to ASD then List item list_city should be populated with the values having State_NAME=ASD not of State_Name=XY or None.I have tried it to make but not succeeded.I have made a procedure to populate list_city list item as:
    -- here item_nm-->List item Name,  sel_val & sel_val2 for selecting C_ID and C_NAME,   tablNm---->tbl_CITY,  whr for where condition,   mtch--->selected value of list_State(list item in form)
    PROCEDURE list_item(block_nm varchar2,item_nm varchar2,sel_val varchar2,sel_val2 varchar2,tablNm varchar2,whr varchar2,mtch varchar2) IS
    group_id RecordGroup;
    group_name varchar2(10) :='abc';
    status NUMBER;
    query1 varchar2(350);
    item_name varchar2(20);
    match varchar2(50);
    BEGIN
        match:=mtch;
        item_name:=block_nm||'.'||item_nm;
      group_id := find_group(group_name);
    if not id_null(group_id) then
    delete_group(group_id);
    end if;
    --if whr='' then
    --    match:='0';
    --    end if;
    query1:='select '|| sel_val || ',TO_CHAR('|| sel_val2 || ') from '|| tablNm ||' where '||whr||' = '||mtch;
    message(query1);
    group_id := Create_Group_From_Query(group_name,query1);
    /* Select statement must have two column*/
    status := Populate_Group(group_id);
    Populate_List(item_name,group_id);
    exception
        when others then
        message('error');
    END;
    I am not  able to guess what trigger  in oracle forms should be used to populate list item(list_city). Please help by giving useful suggestion.
    Thank You
    regards
    aaditya

    979801 wrote:
    If I use LOV in place of List Item,Then I have to populate a LOV at run time.How could I maintain a record group n attach to LOV at run time?
    On my previous post I have mentioned record group as follows:
    select * from tbl_state where s_id=:tbl_address.s_id;
    If :tbl_adress.s_id chaned during the time of run, then output values of list_city (LOV) is also changed.

  • How to insert special character from Oracle form builder 10g

    Dear all,
    I need help. how to insert special character like 'Superscript or Subscript ' from oracle form builder 10g. I had try in Oracle form builder 6i with press ALT+ASCII code in the text item and it work, but in the oracle form builder 10g this method doesn't work... would you like to help me...somebody please...
    Best Regard,
    Dedy P.T.

    What do you mean by insert ... from Forms Builder? Do you mean you want to add it as text in a string of pl/sql code or as part of boiler plate text (label) or a value on the Property Palette?
    For special characters you would need set NLS_LANG to something that would support the characters you want to use. For the Builder to see the change, you would need to set NLS_LANG to something like:
    NLS_LANG=AMERICAN_AMERICA.UTF8
    This can be done in the Windows Registry or system. As I mentioned, this will only apply to the Builder and will have nothing to do with a running form. For running forms you would need to set this in default.env. As for things like super and sub scripts, these are font formats and not necessarily characters. For the most part, I don't believe these are supported in Forms.

Maybe you are looking for