Go_item problem

Hi,
I have two different modules. One is customer module and other one is main menu module. Now when I click on customer button in main menu module the customer form comes up, but the cursor does not go to customerID, which is should when i do go_item. If you can help me out with the syntax i will appreciate it. So far i have go_item(customer.customerID) and it is giving me this error error 357 table, view, or sequence reference 'CUSTOMER.CUST_ID' not allowed in this context. Any help will be appreciated. Thanks

Hi,
you call go_item(customer.customerID) but receive an error message saying table, view, or sequence reference 'CUSTOMER.CUST_ID' not allowed in this context. Now how can the error message refer to a different input argument than the go_item() call. I assume that the problem is somewhere else than in the buoöt-in call, which should be
go_item('customer.customerID');
Frank

Similar Messages

  • Go_item problem on stacked canvas

    Hello.
    I use stacked canvas in my form. On that canvas i have a button. User use this button to close stacked canvas. I use:
    hide_view('canvas_name');
    go_item('block.item_name');
    It seems as go_item is not working. Cursor only moves to the block and to the first item in that block.
    Why doesn't cursor move to item i choose?
    Thanks.

    Hello.
    It's still not working.
    And i'm not hidding first canvas.
    It is the main canvas. And on that canvas i press button to open small stacked canvas. And on that stacked canvas there is a button to close this canvas and to move cursor to one item on the main canvas. And that is not working. Cursor moves to the first block item on main canvas.

  • LOV problem regarding go_item

    Hallo Friends,
    i have two datablock, each containing some text field, In first datablock i have one Text field cointaining LOV, After select the specific value from that LOV, i want to set that value in that text field and set focus on next field present in next or another Block.
    Thanks.

    Hi,
    The Auto Skip property will navigate to the next navigable item. And if you want to specify to which item you want to navigate, then you have to write in the KEY-LIST-VAL trigger of the item.
    DECLARE
         Bln_Temp BOOLEAN;     
    BEGIN
         Bln_Temp := SHOW_LOV('<lov_name>');
         GO_ITEM('<block_name>.<item_name>')
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Problem with set_item_instance_property and set_lov_property

    Hello guys,
    I am using oracle forms 6i and new to it. I am having a multi data block.
    I am facing a problem when I try to set the item instance property with respect to the list type.
    1) Basically, I am having a list item having three types MANUAL, INVOICE and BOE. All are independent of each other. I am facing the problem with the MANUAL type.
    I have written this code on When-Validate-Trigger of the list item as well as When-List-Changed. Also I am not setting the properties of any items initially(neither on When-New-Form-Instance nor on When-New-Block-Instance).
    if block.doc_type = 'MANUAL' then
    set_item_instance_property('BLOCK.VENDOR_NO', to_number(:system.cursor_record), REQUIRED,PROPERTY_TRUE);
    end if;
    But I am getting this warning/error frm 41383 - no such property for set_item_instance_property on both the triggers for the first time when I open the form and thereafter. During the same form session, if I click on the next line it shows a message Field cannot be empty and directs to the item where I compulsory need to insert a value. I also tried using to_number(:system.trigger_record) but getting the same issue. There are many more items I need to set the same property for.
    2)The invoice item on the block/form has a LOV. Another requirement is when I select 'MANUAL' , that LOV should not appear on selection of 'MANUAL' type and the user should be able to insert the value manually and validate manually. I did use set_lov_property, but did not get the correct usage. Please assist as soon as you can.
    Edited by: 1005292 on May 20, 2013 12:04 PM

    Just out of my interest I would like to know what you exactly meant by "The :SYSTEM.CURSOR_RECORD reflects where the navigation cursor is; which could be different from the record that is initiating the event." in your reply.If you look at the Forms Help for both objects, you will see that...
    SYSTEM.CURSOR_RECORD represents the number of the record where the cursor is located. This number represents the record's current physical order in the block's list of records. The value is always a character string.
    SYSTEM.TRIGGER_RECORD represents the number of the record that Form Builder is processing. This number represents the record's current physical order in the block's list of records. The value is always a character string. Through PL/SQL you can send (using the GO_ITEM, GO_BLOCK and GO_RECORD built-ins) the interenal Forms Cursor to a different item, block or record within the current block. If, you GO to a different block or record in the same body of code and you then evaluated the :SYSTEM.CURSOR_RECORD and compared it with the :SYSTEM.TRIGGER_RECORD you would find that they are generally different.
    2) In response to the second one, do you want to say that when it I select MANUAL I do not use the set_item_property OR use this property and attach an LOV which does not return anything OR use this property, give the name of the same of the same LOV,I am using and set PROPERTY_FALSE. First a litte back ground. When an Item has an LOV assigned to it, Oracle Forms automatically displays what it calls the "LOV List Lamp" in the status bar. With Forms 9i and higher, it displays and "List of Valu..." in the status bar when an item has an LOV assigned to it. Items can have an LOV assigned during design-time or during run-time. You cannot, however, unassign an LOV during Run-time becuase the SET_ITEM_PROPERTY built-in requires you to pass a valid LOV object name.
    Well, as I was writing this, it occured to me that you will not be able to set the LOV assigned to your multi-row item at run-time either because once you assign an LOV to an item in a multi-row block, all occurances of the Item will have the LOV assigned. This being the case, I would recommend using a button and give it the appearance of enabled or disabled by using the VISUAL_ATTRIBUTE property and add code to the button so that if the row status is MANUAL then nothing happens. Using this method, you would create two Visual Attribute (VA) objects; ENABLED and DISABLED. The ENABLED VA would make the button look like a normal button while the DISABLED VA would make the button look like it is disabled (grey out button text, etc).
    I would also like to know when to use set_lov_property and if you could explain in brief with an example.The only time I have used the SET_LOV_PROPERTY() built-in is when I needed to change the Record Group query assigned to the LOV. We have a form where depending on the "Action" selected, the LOV for a certain item needed to change. The values returned by the LOV were still assigned to the same block items, so rather than create multiple LOVs and set the Column Mapping for each LOV, I just create a Record Group object for each action and then used the SET_LOV_PROPERTY() built-in to change the LOV TITLE and GROUP_NAME. This way, I was able to reuse the LOV and it's existing column mappings while changing the record group that provided the data for the LOV.
    The problem lies when I am entering the fields after the invoice number. The fields before the invoice no including the field of invoice no hold the value entered but when I click/press a tab key to go on to the next field the values in the earlier fields(i.e fields before invoice no and invoice no field) disappear i.e. the values do not hold their place and again prompts me from start to enter the vendor no.Are you navigating to a new row/record? That could explain the disappearing data. If not, then I would look for a trigger on the item you're navigating too or for a Block level When-New-Item-Instance trigger that has code that sets the items to null. It sounds like something in the design is causing the field values to disappear (get set to NULL) so I would look at what happens in your form when a navigation event occurs.
    @Andreas - actually, REQUIRED is a valid property for the Set-Item-Instance-Property() built-in. ;)
    Hope this helps,
    Craig...

  • In which trigger can i use go_item() in oracle forms 6i?

    Hi,
        I have a problem with go_item.
    I tried executing go_item() in triggers like key_next_item, pre_text_item, post_text_item & when_validate_item.
    But none of them seemed to be working.
    I searched for other possibilities in the site, where i found a solution of using trigger ' when_timer_expired ' with ' when_validate_item ' ,
    but when i tried to create trigger, i did not find that trigger (when_timer_expired)  in the list at all.
    I'm using oracle form builder 6i.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.
    A trigger with go_item() must be created when tab is pressed.
    In which trigger can i use go_item() ??
    Thank You.

    from help:
    Restricted Built-in Subprograms
    Restricted Built-ins affect navigation in your form, either external screen navigation, or internal navigation. You can call these Built-ins only from triggers while no internal navigation is occurring.
    Restricted Built-ins cannot be called from the Pre and Post triggers, which fire when Oracle Forms is navigating from object to another.
    Restricted Built-ins can be called from the When triggers that are specific to interface items, such as When-Button-Pressed or When-Checkbox-Changed. Restricted Built-ins can also be called from any of the When-New-"object"-Instance triggers and from key triggers.
    Unrestricted Built-ins do not affect logical or physical navigation and can be called from any trigger.
    The Built-in descriptions include a heading, Built-In Type, that indicates if the Built-in is restricted or unrestricted.

  • (another) stacked canvas on content canvas problem

    I've searched the forums for the last 2+ hours and can't find a solution for my problem, although there are hundreds of questions on this subject.
    I have a stacked canvas on top of a content canvas. The canvases share the same window. They also share a data block. I added radio buttons on the main canvas to "show/hide" the stacked (my ultimate goal is to have 2-3 stacked and toggle. When hide, the stacked canvas is hidden, but when i click show, it is not. I understand reading all the posts that the block with focus will display, and I've added both a go_block and go_item prior to the show_view. Below is my code. MEL_DETAILS is content and MEL_LINE_ITEM is stacked.
    IF :stack = 'SHOW_STACK' THEN
    GO_BLOCK('MEL_ITEM');
    GO_ITEM('MEL_ITEM.MIS_PROJECT_NO');
    SHOW_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', display_position, 718, 583);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_FALSE); -- radio button
    ELSif :stack = 'HIDE_STACK' THEN
    HIDE_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_TRUE);
    END IF;

    user12198246 wrote:
    I've searched the forums for the last 2+ hours and can't find a solution for my problem, although there are hundreds of questions on this subject.
    I have a stacked canvas on top of a content canvas. The canvases share the same window. They also share a data block. I added radio buttons on the main canvas to "show/hide" the stacked (my ultimate goal is to have 2-3 stacked and toggle. When hide, the stacked canvas is hidden, but when i click show, it is not. I understand reading all the posts that the block with focus will display, and I've added both a go_block and go_item prior to the show_view. Below is my code. MEL_DETAILS is content and MEL_LINE_ITEM is stacked.
    IF :stack = 'SHOW_STACK' THEN
    GO_BLOCK('MEL_ITEM');
    GO_ITEM('MEL_ITEM.MIS_PROJECT_NO');
    SHOW_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', display_position, 718, 583);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_FALSE); -- radio button
    ELSif :stack = 'HIDE_STACK' THEN
    HIDE_VIEW('MEL_LINE_ITEM');
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);
    SET_ITEM_PROPERTY('PROJECTS.STACK',MOUSE_NAVIGATE,PROPERTY_TRUE);
    END IF;Here, it seems two problem..
    The line..
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_true);
    and
    SET_VIEW_PROPERTY('MEL_LINE_ITEM', visible, property_false);No needed
    Hope this helps
    Hamid

  • Navigation Problem in forms 10.1.2.0.2 !!!

    Hi All,
    when we create relation between master and child block then getting problem in navigation.
    i assume that you have form with two block with relation and data then execute query then
    start following step
    0) make sure you set required = true for first navigation item of child block
    1) you are in child block make some change on any item and make your cursor must not be on first navigation item.
    3) commit the form
    2) then click on master block and here make sure you are clicking on non current record.
    From
    Chirag Patel
    From
    Chirag Patel

    Thanks Frank,
    Yes Frank please follow the steps.
    this is error explanation :
    I have debug many times !!!
    actually it is not error but funny behaviour !!
    when you click on parent block on diffrent record then validataion trigger of first item of child block will fire. I do not why it is happening !!!
    I removed the validation trigger and did required=true for first navaigation item of child block then also it's behaving funny.
    This are the steps.
    1) create form with parent and child block and make relation ship
    2) insure that you put 2 record in parent and 2-2 recors in child for each parent record.
    3) insure that your first navigation item of child block has required property = true
    4) run your form fresh
    5) from parent bloc execute query ( I hope child block is populate some records)
    6) click on any record of child block and make changes
    7) then commit your form.
    now fun will start
    8) click on parent block on any record which has child records and non current record.
    9) then form should populate details for child instead of it behaves different as follows
    you will find FRM-40202 : Field must be entered
    your cussor will remian in child block;
    your record will not change in parent block.
    and child block will remail blank.
    by debugging I found that problem is coming from this code of <Clear_All_Master_Details> procedure
    -- Put cursor back where it started
    IF :System.Cursor_Item <> startitm THEN
    Go_Item(startitm);
    Check_Package_Failure;
    END IF;
    when I remove this line
    Go_Item(startitm);
    then my problem is solved
    But I do not know what is the other impact can be possible by removing this.
    Hello Frank
    I hope you will catch this error by this example.
    From
    Chirag Patel

  • Dynamic LOV problem in Master Detail form in 3.0

    I am using Master detail layout for my app, In detail there is a LOV depending on the value of one of the items in master.
    LOV statement is like this
    select col1 a,col1 2
    from test_tab
    where col2 = :P2_VAL ;
    Note: :P2_VAL is the value of the one of the master table column value
    This code is working fine in version 2.1 .
    After I Upgraded to 3.0 , it is not working .
    If I put the hardcoded value like col2 = 'TEST' , it works for those values. Any suggestions for this problem is greatly appreciated.

    I solved it by commenting the Go_Item(startitm); line in the clear_all_records program unit which is generated by oracle forms.
    as shown below.
    IF :System.Cursor_Item <> startitm THEN
    --Go_Item(startitm);
    Check_Package_Failure;
    END IF;

  • Problem with Two tab canvases in a form

    Hi Experts,
    I am working on Oracle forms 10g (OS: Windows7) from last 1 year. I have got a requirement to create a form with one tab canvas CAN_TAB (with 2 tab pages) in main page and a pop up tab canvas ASN_SPLIT_TAB(with 2 tab pages). Now the problem is whenever we click on tabs it will fire WHEN-TAB-PAGE-CHANGED trigger and executes the complete code. As a result even if i click a tab page in CAN_TAB canvas it will fire for ASN_SPLIT_CANVAS as well. Check the below code (WHEN-TAB-PAGE-CHANGED). Now i have to differentiate between two tab canvases so that i can use IF-ELSE statement to overcome this problem. Please share your useful comments.
    BEGIN
    Lv_Toppage := Upper(Get_canvas_property('CAN_TAB',Topmost_Tab_page));
      if Lv_Toppage = 'LINES' THEN 
      go_item('shipment_summary.shipment_reference');
      show_view('CAN_LINES');
      show_view('CAN_SCROLL');
      elsif Lv_Toppage = 'ATTRIBUTES' THEN
      go_item('shipment_summary.shipment_reference');
      show_view('CAN_ATT' );
      elsif Lv_Toppage = 'AUDIT' THEN
      go_item('shipment_summary.confirmedby');
      show_view('AUDIT');
      end if;
    Lv_Toppage := Upper(Get_canvas_property('ASN_SPLIT_TAB',Topmost_Tab_page));
      IF Lv_Toppage = 'INVOICE_SPLIT' THEN
      show_view('ASN_SPLIT_STACK');
      go_item('ASN_INBOUND_CATEGORY_SUMMARY.brand_representitive');
      ELSIF Lv_Toppage = 'SUPPLIER' THEN
      go_item('CONTROL.cancel_but');
      END IF;
      hide_view('ASN_SPLIT_STACK');
    END;

    Thanks Craig. You made it happen..!! Below code is working fine for me.
    IF :SYSTEM.tab_new_page = 'LINES' THEN
      go_item('shipment_summary.shipment_reference');
      show_view('CAN_LINES');
      show_view('CAN_SCROLL');
    ELSIF :SYSTEM.tab_new_page = 'ATTRIBUTES' THEN
      go_item('shipment_summary.shipment_reference');
      show_view('CAN_ATT' );
    ELSIF :SYSTEM.tab_new_page = 'INVOICE_SPLIT' THEN
    END IF;

  • Problem while transfering data from form to excel

    Hi all.
    I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
    The block has 2200 records.
    The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
    I'm on developer suite 10g.
    Here is the code:
    PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    range OLE2.OBJ_TYPE;
    range_col OLE2.OBJ_TYPE;
    -- Declare handles to OLE argument lists
    args OLE2.LIST_TYPE;
    -- Declare form and block items
    form_name VARCHAR2(100);
    f_block VARCHAR2(100);
    l_block VARCHAR2(100);
    f_item VARCHAR2(100);
    l_item VARCHAR2(100);
    cur_block VARCHAR2(100) := NAME_IN('system.current_block');
    cur_item VARCHAR2(100) := NAME_IN('system.current_item');
    cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
    item_name VARCHAR2(100);
    baslik VARCHAR2(100);
    row_n NUMBER;
    col_n NUMBER;
    filename VARCHAR2(100);
    BEGIN
    -- Start Excel
    application:=OLE2.CREATE_OBJ('Excel.Application');
    OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
    -- Return object handle to the Workbooks collection
    workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    -- Add a new Workbook object to the Workbooks collection
    workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
    -- Return object handle to the Worksheets collection for the Workbook
    worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    -- Get the first Worksheet in the Worksheets collection
    -- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
    OLE2.DESTROY_ARGLIST(args);
    -- Return object handle to cell A1 on the new Worksheet
    go_block(p_block_name);
    baslik := get_block_property(p_block_name,FIRST_ITEM);
    f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
    l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
    first_record;
    LOOP
    item_name := f_item;
    row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
    col_n := 1;
    LOOP
    IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
    get_item_property(item_name,VISIBLE)='TRUE'
    THEN
    -- Set first row with the item names
    IF row_n=1 THEN
    baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(cell, 'Value', baslik);
    OLE2.RELEASE_OBJ(cell);
    END IF;
    -- Set other rows with the item values
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n+1);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
    OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
    END IF;
    OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
    OLE2.RELEASE_OBJ(cell);
    END IF;
    IF item_name = l_item THEN
    exit;
    END IF;
    baslik := get_item_property(item_name,NEXTITEM);
    item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
    col_n := col_n + 1;
    END LOOP;
    EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    -- Autofit columns
    range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
    range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
    OLE2.INVOKE( range_col,'AutoFit' );
    OLE2.RELEASE_OBJ( range );
    OLE2.RELEASE_OBJ( range_col );
    -- Get filename and path
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args, p_block_name );
    OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
    filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
    OLE2.DESTROY_ARGLIST( args );
    -- Save as worksheet
    IF NVL(filename,'0')<>'0' THEN
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args,filename );
    OLE2.INVOKE( worksheet,'SaveAs',args );
    OLE2.DESTROY_ARGLIST( args );
    END IF;
    -- Close workbook
    OLE2.INVOKE( workbook ,'Close');
    -- Release the OLE objects
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    OLE2.INVOKE(application, 'Quit');
    OLE2.RELEASE_OBJ(application);
    -- Focus to the original location
    go_block(cur_block);
    go_record(cur_record);
    go_item(cur_block||'.'||cur_item);
    END;
    Is there anyone that can help me????
    Thanks,
    Fabrizio

    Hi all.
    I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
    The block has 2200 records.
    The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
    I'm on developer suite 10g.
    Here is the code:
    PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    range OLE2.OBJ_TYPE;
    range_col OLE2.OBJ_TYPE;
    -- Declare handles to OLE argument lists
    args OLE2.LIST_TYPE;
    -- Declare form and block items
    form_name VARCHAR2(100);
    f_block VARCHAR2(100);
    l_block VARCHAR2(100);
    f_item VARCHAR2(100);
    l_item VARCHAR2(100);
    cur_block VARCHAR2(100) := NAME_IN('system.current_block');
    cur_item VARCHAR2(100) := NAME_IN('system.current_item');
    cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
    item_name VARCHAR2(100);
    baslik VARCHAR2(100);
    row_n NUMBER;
    col_n NUMBER;
    filename VARCHAR2(100);
    BEGIN
    -- Start Excel
    application:=OLE2.CREATE_OBJ('Excel.Application');
    OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
    -- Return object handle to the Workbooks collection
    workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    -- Add a new Workbook object to the Workbooks collection
    workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
    -- Return object handle to the Worksheets collection for the Workbook
    worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    -- Get the first Worksheet in the Worksheets collection
    -- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
    OLE2.DESTROY_ARGLIST(args);
    -- Return object handle to cell A1 on the new Worksheet
    go_block(p_block_name);
    baslik := get_block_property(p_block_name,FIRST_ITEM);
    f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
    l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
    first_record;
    LOOP
    item_name := f_item;
    row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
    col_n := 1;
    LOOP
    IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
    get_item_property(item_name,VISIBLE)='TRUE'
    THEN
    -- Set first row with the item names
    IF row_n=1 THEN
    baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(cell, 'Value', baslik);
    OLE2.RELEASE_OBJ(cell);
    END IF;
    -- Set other rows with the item values
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n+1);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
    OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
    END IF;
    OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
    OLE2.RELEASE_OBJ(cell);
    END IF;
    IF item_name = l_item THEN
    exit;
    END IF;
    baslik := get_item_property(item_name,NEXTITEM);
    item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
    col_n := col_n + 1;
    END LOOP;
    EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    -- Autofit columns
    range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
    range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
    OLE2.INVOKE( range_col,'AutoFit' );
    OLE2.RELEASE_OBJ( range );
    OLE2.RELEASE_OBJ( range_col );
    -- Get filename and path
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args, p_block_name );
    OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
    filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
    OLE2.DESTROY_ARGLIST( args );
    -- Save as worksheet
    IF NVL(filename,'0')<>'0' THEN
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args,filename );
    OLE2.INVOKE( worksheet,'SaveAs',args );
    OLE2.DESTROY_ARGLIST( args );
    END IF;
    -- Close workbook
    OLE2.INVOKE( workbook ,'Close');
    -- Release the OLE objects
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    OLE2.INVOKE(application, 'Quit');
    OLE2.RELEASE_OBJ(application);
    -- Focus to the original location
    go_block(cur_block);
    go_record(cur_record);
    go_item(cur_block||'.'||cur_item);
    END;
    Is there anyone that can help me????
    Thanks,
    Fabrizio

  • Oracle Forms..  Master/Detail problem

    Hi,..
    I have a problem..
    I have 2 blocks in a page. One is an single row block and the other one an multirow block.. master/detail relationship.
    I would like that when I change a specifike item in the master block, a column of a specifike record gets changed.
    For example:
    master block has 3 items.. day, time and weather.
    detail block is a multirow block with items.. accessori, owned, take.
    when you choise a day and time.. but when you change weather (example to rainy) it goes into the multirow and searches for umbrella and changes the value of column take to YES.
    Can anybody help me?
    Gr.
    Kenneth
    Edited by: KHE on 24-mrt-2011 16:15

    Hi
    FRM 40737: Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.. yes u can't use GO_BLOCK built in WHEN-VALIDATE-ITEM trigger
    u can use timer to do it in WHEN-VALIDATE-ITEM trigger as
    DECLARE
      vTimer TIMER;
    BEGIN
      vTimer:=CREATE_TIMER('TEMP',10,NO_REPEAT);
    END;at form-level called WHEN-TIMER-EXPIRED and use the code ...
    GO_BLOCK ('BLOCK_NAME');
    GO_ITEM('ITEM_NAME');
    DELETE_TIMER('TEMP');Hope this helps...
    Regards,
    Abdetu...

  • Problem in Execute query on non-database block and database block together

    Hi All,
    In my form,i have
    1. First block is Non-database block with one non-database item.
    2. Second and third blocks are database blocks.
    Now the problem is that i want to perform execute-query for all the blocks.
    If the cursor is on the non-database item of 1st block and i clicks on the "Enter-query" then i am getting message " This function can not be performed here".
    If i click on the item of the database block and then clicks on the "Enter-query" and then "execute-query" it's working fine.
    But i don't want to do in this way.
    My cursor will be on the First block only and then it should perform execute-query.
    I am using this non-database item to copy value of this item to the item of the database block item.
    I think i make you understand about my problem.
    I am using forms 10g on Window xp.
    Please help me.

    Hi!
    Simply create a enter-query trigger on the non-database-block:
    begin
    go_block ( 'database_block' );
    enter_query;
    end;If your search criteria is in the non-database-item in the first block,
    you actually do not need the enter_query build-in.
    Just create a execute-query trigger on the first block like:
    begin
    go_block ( 'database_block' );
    execute_query;
    go_item ( :System.trigger_item );
    end;And in a pre-query trigger on the database-block copy the
    value of your seach item into the item you want to search for.
    Regards

  • Go_item(:detail.item) after query(F7) in master, frm-40737

    Dear friends,
    I have a master block and a detail block. When the master block ist queried, I want to go to a disticnt item in detail block, if there are records. Therefore I tried to put code in the post_query of the detail_block, which caused error frm-40737:
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
    go_item('evm_a_liefrant.liefrant_uk');
    else
    go_item('lieferschein.belegnr')
    end if;
    error message says, that I cannot call the restricted procedure go_item in post_query.
    okay, but where can I put this code that it is called automatically after query?
    Thanks
    Silke

    Thank you I tried it, principally it works, but there is a problem left. This is my code in key_exeqry of detail:
    execute_query;
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
         -- keine Artikel am lagerort
         go_item('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
    else
         go_item('lieferschein.belegnr');
         message('lieferschein.belegnr');
         message('lieferschein.belegnr');
    end if;     
    When t´here are records in the detail block else is choosen, but forms doesn't go the item!
    The 'old' item (from where F8 was pressed) stays activated.

  • Weird LOV behaviour - delay when go_block,go_item

    Hi,
    I have a lov and after the user selects a value I go to another block and execute a query. Problem is that after I check the return value of show_lov and find it true, it takes some 3-4 secoonds for the code to execute if it had a go_item or go_block statement.
    To understand it better:
    a := SHOW_LOV('LOV_ALL_EMP');
         IF a = TRUE THEN
    IF HERE I PUT A GO_ITEM OR GO_BLOCK STATEMENT (WHICH IS NEEDED TO EXECUTE QUERY THEN) I TAKE A 3 SECOND DELAY FOR SOME REASON (ONLY AT THE FIRST GO_BLOCK OR GO_ITEM IF I HAVE 2 OR MORE I GET THE DELAY ONLY AT THE FIRST. OTHER STATEMENTS DONT STUCK.
    ELSE
    IF USER DOES NOT SELECT A VALUE DELAY DOES NOT OCCUR EVEN IF I USE GO_BLOCK
    END IF;
    To put it more generally:
    When I execute a the first GO_ITEM or GO_BLOCK statement AFTER the call of a LOV it seems to stuck for a little.. Even if statement refers to the block already focused. Also for the delay to occur, user have to select a value from LOV i.e. if user does not select a value (and show_lov returns false) this delay does not happen. Why?
    Any ideas on this strange behaviour please?
    regards,
    teo

    Well Steve,
    seems it's something like that. What I did is to check if it is the same on other PCs in here and it is the same, but unfortunatelly I wouldnt have the opportunity to check it on an OS other than XP home. Laptop I use for testing over the Web has Win 2000 but I use PSTN there so speed is totally different and I can't tell if there's a difference.
    Anyway I really don't have too much time to lose on that (it seems tricky) and moreover I don't think I'm using LOV in this case cause UI seems too poor for my requirements so I'll do a 'LOV' by myself.. So I will abandon this although its interesting. If later on I find anything else or be able to test it on another OS I'll get back on this post.
    I really appreciate your interest.
    For the history:
    Forms 9i on AS9i
    Win XP Home on which lies the AS9i (same used as a client)
    DB server 9i on other PC in the LAN

  • Stacked canvas dispalying problem

    hi am displaying multiple stacked canvas on a content canvas. i have a problem in displaying them even hiding the first canvas(B) am not able to display the second canvas(A) its still showing the first canvas(B).
    am using show_view(A) to display the stacked view while i use hide_view(B) to hide the canvas B
    almost both the stacked canvas have same fields in particular i kept the mirror fields on the stack B from stack A.
    my requirement is to display stacked canvas A or B dynamically!!
    can any one direct me with some gud solution.
    thanks in advance.
    regards,
    madhan

    Hi Madan,
    You are using correct function to do so. But you may need to manipulate.
    When you want to show canvas A or B, follow the mentioned steps:
    If you want to hide B and show A
    IF canvas b is visible then
    hide_view(B);
    show_view (A);
    go_Item (item_on_cavans A)
    END IF;
    And vice versa.
    Cheers
    Ram

Maybe you are looking for