Problem in query detail block

hello all,
i have a form having master and detail block. in master we have store_cd and location code(primary key in master table),
based on that detail recrds fetch in detail block. perfectly fine. but when i query within detail block records then it show no record found. please tell me what can be wrong.
detail table primary key is (store_cd, location_code and storage_co) , in realtion i mentioned
masterblock.store_cd=detailblock.store_cd and masterblock.location_cd=detailblock.location_cd
Thanks
yash

yes, there are records in detail table... table structure(master and detail block)
SQL> desc ivt_store_mst
Name Null? Type
STORE_CD NOT NULL VARCHAR2(3)
STORE_DESC NOT NULL VARCHAR2(25)
LVL_REF_CD NOT NULL VARCHAR2(6)
STORE_TYPE VARCHAR2(2)
Primary key(store_cd,lvl_ref_cd)
SQL> desc ivt_storg_mst;
Name Null? Type
STORE_CD NOT NULL VARCHAR2(3)
STORAGE_SRL_NO NOT NULL NUMBER(10)
STORAGE_CD VARCHAR2(10)
ITEM_CD NOT NULL VARCHAR2(10)
BAY_NO VARCHAR2(10)
SHELF_NO VARCHAR2(10)
ROW_NO VARCHAR2(10)
TIER_NO VARCHAR2(10)
BIN_CARD_NO VARCHAR2(10)
INSERT_DT DATE
GRN_NO VARCHAR2(12)
GRN_FIN_YR_CD VARCHAR2(8)
PLEVEL_REF_CD NOT NULL VARCHAR2(6)
PGRN_LEVEL_REF_CD VARCHAR2(6)
Primary key(store_cd,storage_cd, plevel_ref_cd)
relation property is: noo-isolated
deferred: false
autoquery: false
block join condition based on detail_blk1.stor_cd=masteblk.store_cd
when i query from master block , ALL detail blocks ITEMS are displaying. but when i query again among detail block items then, no record found base on query field(detail blk: item_cd which is base table field).
when i query in detail block for all records then Every time only one item display with same item_cd...
if further some info required, plz mention

Similar Messages

  • Oracle Forms : Master Detail : Cannot query detail block

    MY requirement is: when user enters records in master block, the corresponding records should be displayed in the detail block. (Detail block is just for viewing).
    Master block is a database block based on a custom table. All fields are enetereble in this block.
    Detail block is a a database block based on view which is built joining the custom table(on which master block is built) & a standard table. None of the fields in detail block are editable. they are just display only. For detail block, set the Key Mode=Non-Updatable, Enabled a field as Primary Key.
    I have created a relation between the 2 blocks. (Deferred=No, AutoQuery=No, Delete Record Behaviour=Isolated.). There is a join between master table & this view.
    But when I enter record in master block & save. the detail block records are not displayed. (Message : No Navigable Items in Detail Block).
    Yes, there are no navigable items in detail block, because its just for viewing purpose. How can this be achieved.
    Thanks,
    Naveen

    Thanks for your inputs. I got the solution for this. Earlier all items in the block were DISPLAY_ONLY. Now, I have selected them as TEXT_ITEMS (even though they are not updatable). It is working fine now. Thanks.

  • LOV problem in Master-detail blocks

    Hi,
    I'm working with Designer 6.0.3.5.0.
    I've got a form with two master-details blocks :
    Block A
    |
    |||
    Block B
    |
    |||
    Block C - Lov D/E
    In my block C, i want to create two lovs (D/E).
    When i'am displaying the key item of the block (FK between C and the LOVs) and with the property "Enter FK with Descriptor"=NO. The LOV is OK on the key item and works correctly.
    But when i want to display only the descritor item (with the property "Enter FK with Descriptor"=Yes). The item is correctly displayed but without the LOV. If i open my module with forms, i can see that the lov is not built.
    Does somebody know if i miss something or if it's a bug ?
    Thanks for your help.
    Dominique

    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 in Master-Detail blocks

    Master table : M_sysid, item_code, qty
    Detail table : D_sysid, M_sysid, bno, qty
    Requirement :
    The sum(qty) in detail should always match with master's qty, if the item is a batch item. Post should not be used in the form. The system should not throw 'Changes made...want to save ?' system message.
    Currently we are using recordgroups for qty validation and ON-INSERT trigger is also used in the block-level. Because of this trigger, the document is saved even if any error occurs at the time of saving. So we want to remove ON-INSERT trigger as well as recordgroups.
    Kindly provide an optimal solution.
    Thanks in advance.
    Cheers,
    Uma

    hi
    in key enter_query trigger
    and content canvaz.
    but what is the relation between my question and your answer?
    i can't understand.
    thanks.
    shoja

  • Master/detail blocks problem

    hi friends
    i have a problem with master/detail blocks in my form.
    i have two blocks one is master and the other one is detail
    i made a relation between these two blocks
    and my form works corectly
    but when i am in enter_query mode ,my cursor cannot go to detail block.
    so i can't search special records in detail block.
    is there any way to search detail block's value in form builder?
    is it true that in master/detail blocks we can serach records only in master records?
    any help would be appretiated.
    regards,
    shoja.

    When a Block is in Query Mode the cursor is restricted to it - there is nothing to stop you from Querying the Master and then navigating to the Detail and going into Enter Query mode in that block afterwards.
    If you need to enter Query Criteria that applies to both the Master And Detail then you'll need to build a specialist query screen using a Non DB block that gathers all of the criteria and then uses SET_BLOCK_PROPERTY on both the master and the detail to define the required results.

  • Query forms based on detail block

    My question is pretty simple: Is it possible to query a form (Forms [32 Bit] Version 6.0.8.11.3) based on a detail block? Let me explain my problem! I have a table called REQUISITION and of its field is STATUS_CODE. Then I have another table called STATUS that have the following fields: CODE, NAME, DESCRIPTION, PHASE, etc. The join condition between REQUISTION and STATUS is REQUISITION.STATUS_CODE = STATUS.CODE. On my form, all of the fields come from table REQUISITION but the problem is that we have over 30 different status and my user can't remember their names and phase. So I inserted two display fields on the forms and wrote a post-query trigger to populate the field with their corresponding names and phases. But now my end user are complaining that the fields don't allow queries to be performed which prevents them to use a query to know all requisitions that are on phase "Procurement" which corresponds to four different status_code. So I though in inserting the fields PHASE and DESCRIPTION into table REQUISITION and write a trigger that would populate those field every time the STATUS change but that would cause a problem when lets say STATUS 01 is part of PHASE "Procurement" then comes next week the company decides that is not longer part of phase "Procurement" but now it is part of PHASE "Purchasing" they would go the form based on table STATUS and change the field PHASE of the corresponding STATUS that they want. But now I have this data on another table holding information that is no longer valid. Sure I could write another trigger to change field REQUISITION.STATUS_PHASE whenever there is a change on STATUS.PHASE but wouldn't that be too much bookkeeping? Would be so much easier if I could query my forms based on the detail block (this case table STATUS and master block table REQUISITION)?
    thanks so much in advance for any thought! Btw, I am open to other suggestions too!!!!!
    gleisson henrique

    if I understood you correctly, you can do this manually. what I mean is,
    when the end user picks phase "Purchasing", you can change the where clause on the master block and execute the query to get the desired results
    e.g.
    v_cod varchar2(200) := 'STATUS_CODE in (select code from status where phase = ''Purchasing'')';
    begin
    set_block_property(requisition_blk,default_where,v_cod);
    execute_query;ofcourse you have to change "Purchasing" in the previous code to the item that holds the user inputs
    hope this is helpful
    Edited by: Mohammed H. on Sep 19, 2008 6:45 PM

  • Data missing from Detail Block after query

    Hello all,
    I have created a form with a master and detail block. The master data is on a content canvas the detail data is on a stacked canvas which lies on the content canvas. Before you enter the form a find window appears and asks the user to enter criteria to limit the data shown on the main form or just enter the main form. When I put in criteria to bring up more than one record for the master block the first record shows up fine but when I move to the next record the detail block goes blank. When I go back to the first record the detail block is still blank. I first thought this was a problem with the relationship but the deferred and automatic query are set to NO. I am confused at why this is happening, please help.
    Mike

    Dmytro,
    Thank you for replying to my post. I set the automatic query to yes for the block relationship and I am still having the problem, the deferred coordination property is set to no. If you have any other ideas I would appreciate the help. Could this be because of something that I have put in a trigger on the detail block.
    Mike

  • How to query the master block based on one of the values in detail block

    Hi,
    In version 6i forms, I have a field in data block which is not set as a database item. I am using that field to store a value from detail block. If I want to query the form using that field (which represents one of the values from detail block), how do I do that? Any pointers?
    TIA,

    Do you want to query a master, which contains a specific detail? If so, here's an example how you could do it with a PRE-QUERY-trigger:
    DECLARE
      vcQuery VARCHAR2(4000);
    BEGIN
      IF :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM IS NOT NULL THEN
        -- Build up an exists Sub-Query
        vcQuery:=' MASTERBLOCKID IN (SELECT FK_TO_MASTERBLOCK FROM DETAILTABLE WHERE DETAIL_COLUMN=''' || :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM|| ''')';
      END IF;
      SET_BLOCK_PROPERTY('MASTERBLOCK', DEFAULT_WHERE, vcQuery);
    END;

  • Autofill detail block based on query

    Hi experts/Gurus
    I have 3 tables
    1-pr_mst
    2-pr_trn
    3-hr_mst
    Em_code is a common key between theses tables.
    on my form table 1 and 2 are the base main tables, due to the relationship, when i enter em_code on table 1 and query it, it shows data on both the table. Its a normal behavior in Master Detail block in forms.
    When user enter em_code at form and there is no data found in table 2, obviously it show blank data block related to the table 2 and shows data in table 1 block, now i want an em_code details which stores in the table 3 automatically load in memory and populated in detail block.
    Is it possible ? and how can i do this. suggest me a best or anybody can give example on emp/dept
    regards
    Anwer

    I'm not sure if i understand you correctly. You want to have an additional relation between block 1 and block 3? If so, just create it, each block can have more than one relation as master.

  • Detail blocks in tab pages not queried automatically

    Hi
    I have some generated forms with the following layout:
    - in the content canvas top, the master block
    - below the master block (in the same content canvas), a tab canvas with 2 (or more) pages with detail blocks
    When I query the master block, the detail blocks are not automatically queried, the user must navigate to them to make the automatic query work.
    I found out that it is something related to the blocks not being in the same canvas. But visually, they are in the same canvas, I would like that the detail blocks were queried automatically.
    Is this possible? I think this layout is very common and useful, I am sure Designer has some way to do this.
    Thanks
    Luis Cabral

    Hi
    I found it - I just set BSCSCP preference correctly, and now it works fine!

  • Update detail block based on FROM QUERY

    I have 2 blocks in master-detail relation. The master is based on a table, the detail on from query. The Insert works fine... but whenever i want to update any field from the detail block, the items (text, lists, whatever) don't allow any updating.
    Is there some workaround?
    Thank you for the help
    NR

    RTM on blocks based on from-query.
    If I recall well, it says that you shoud write the DML code in on-insert, on-update and on-delete triggers - and, anyway, if I do not remember well the manual, that's what I do.
    So, the on-insert trigger should have an insert into <my_dml_table>...
    The on-update trigger sould have an update <my_dml_table>... where ... And there's a thing: you may have the rowid of <my_dml_query> fetched - which would be the best - or use some primary key for that table for update (not so good performance).
    The on-delete trigger somewhat like the on-update trigger.
    Moreover, I believe it would be better to have procedures for on-insert, on-update and on-delete grouped in one package in the database - again, this is what I use to do.

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Query a detail block

    Dear members,
    I use Forms 6i c/s, with a 8.1.7 database.
    I have two blocks, with a master-detail relation between them.
    When I try to search for records in the detail block (Enter-Query / Execute-Query), I get only one record: the one that was synchronized from the master block.
    I'd like to find a way to get all the records when querying the detail block, while keeping the master-detail relation.
    Any idea ?
    Is it just the "Copy value from item" on the detail block side that narrows the records to just one ?
    Or can I modify something in the triggers/procedures created by the relation ?
    Thanks for your help.

    I understood your idea of a separate search block, but >one thing remains unclear: where do I populate the >results ?You still query the original M-D blocks to get results by setting the master/detail block's default-where property and execute_query on the block respectively.
    You need to concate the user inputs into a string for default-where as user may input ename and sal two fields to find out how many departments and dependents info.
    The separate dialog even allows user to input detail block's ename, sal and master block's loc fields to get the specific department, which default M-D cannot do this.
    In addition, default search button does not allow you set one master or detail block default-where and execute-query, then go to detail or master block to set default-where and execute-query.
    You do a simple testing on tables of dept and emp, then you will sense this.
    Good luck.

  • Two Master  and two details block problem

    Hi,
    I am getting problem in displaying the correct records on one of the detail block. There is one main master block 'A' and then it has one details block 'B' and then this detial block 'B' has got two details blocks 'c' and 'D'. I form different queries based on the value selected at detail block 'D'. Now i go to ,aster block and execute_query then it fetche the correct record at master block not on detail block 'D'. I have one anmoly in Dtails Block D and Master block B that they are joined with a common field not on the basis of proimary key and forign key. Please sugget

    Hi,
    When you establish the relations using the references, then oracle will look for the parent key in both the parent tables. Either you need to remove the foreign keys or change your db design to add one more table and have one-one parent child relationships.
    HTH
    Regards,
    Badri.

  • Query based on a non-database item in master/detail block

    Hi,
    I have a master/detail block, and in the master the block in have non database control item which displays the user name. Now i would want to retrive all the master/detail records based on the control item. Is that possible? How can i do it?
    Any help would be appriciated.
    Thanks
    Kavitha

    use the set_block_property (default_where) and the execute_query built-ins. more info in the online help

Maybe you are looking for

  • Help me in debugging this procedure

    PROCEDURE p_main_dpn ( m_post IN OUT VARCHAR2, m_company VARCHAR2, m_user_group VARCHAR2, m_user_id VARCHAR2, m_choice VARCHAR2, m_year VARCHAR2, m_period VARCHAR2, m_tot_count NUMBER, g_asset_code VARCHAR2 IS CURSOR c1 (m_last_day_of_period DATE) IS

  • How can I use multiple cameras in Quartz Composer?

    Good morning, all. This is a quartz composer question, but I can't see a quartz-composer specific forum to ask it... As part of a school project at ACAD we are building a rig to record the output from three video cameras to build a panoramic video. I

  • Airport Update and New Problems

    Every since I exposed my rock stable mac to the last airport update and system update, I have had some connectivity problems with my airport. I cannot get Back To My Mac to work. I can't print off of my USB connected to the airport. I went into Airpo

  • ADF Tree Table

    I am using JDev 11g. I created tree table and warped around with toolbar with commandToolbarButton in it. How can I delete leaves or root node? Thanks.

  • I cannot change my keyboard setting to German. What am I missing?

    I Had my keyboard set for German, then yesterday it switched back to English and I can't get it to change back.  What do I do?