Automatic query in a form

I have a report and a form. I want a button or a hyperlink in the footer-part of my report, which opens the form , which receives the id of the record displayed in my report, and the opened form has to display the record automatically when opened.
Is there a solution for this ?

kathy,
there r 2 ways to do it.
1. try creating a QBE report. but, this gives u the report in tabular format. the report by default gives u the functionality of updating and deleteing the record.
at runtime you will see 2 links update and delete. when u click the update it opens the form in the update mode with the record in there, now u can update the record and save it.
2. if you want a free form report. then create 2 same forms.
in the first form make all the columns non-updateable except for the ones which user will use for querying purposes.
create the button in the form and onClick javascript event of the first form open the second form in update mode. and then user can do whatever changes he/she likes.
i had all these different situations and i've tried all of the above and it works.
hope that helps.
null

Similar Messages

  • Query button in forms/portlet

    What is the rules of the automatic Query button in forms displayed as portlet in a page. Sometimes it works and sometimes not.
    Thank's in advance.

    I've found the problem. I have in my form my primary key as a hidden field with a default value generated by a sequence.nextval. What I don't now is that the default value is generated in the form show. So I always have a hidden criteria with a new primary key which never exist and block my query.
    I will generate my primary key id sequence with a trigger before insert in the database, not in the form.

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Master Detail Query automatic query ..Urgent help

    In my last question, I asked about how to automatically query a form based on table or master detail and gota good answer. What I actually need to do is also query on the detail, for example
    select a.user_id, b.week_ending,b.mon_hrs,b.tues_hrs
    from emp_profile a, time_reporting_week b
    where user_id = portal30.wwctx_api.get_user
    and week_ending = '02-JAN-02'
    and a.user_id = b.user_id
    So I know that I can query on master table which is emp profile, but I also need to query on week ending which is in detail. Do I change the clause in my form pacjage?Or should I change something in Additional Pl/sql ??

    There are two ways to achieve this. Both methods have some drawbacks, so please go through them and choose the one that suits you.
    Method 1:
    =========
    This method does not require altering the form package.
    Assumptions : The detail table has a column named WEEK_ENDING.
    Steps :-
    1> Edit the form and select the query button in the left frame of the master section.
    2> For the pl/sql button event handler, choose the action as Query and replace the default code with the following :-
    declare
    l_where varchar2(4000);
    l_where_pre varchar2(4000);
    l_where_post varchar2(4000);
    l_where_pos integer;
    l_week_ending varchar2(4000);
    l_lang varchar2(4000);
    begin
    p_session.get_shadow_value(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_WEEK_ENDING',
    p_index => 1,
    p_value => l_week_ending,
    p_language => l_lang);
    doQuery;
    if l_week_ending is not null then
    l_where := p_session.get_value_as_varchar2(
    p_block_name => 'DEFAULT',
    p_attribute_name => '_DETAIL_WHERE_CLAUSE',
    p_index => 1
    l_where_pos := instr(l_where,' WHERE ');
    l_where_pre := substr(l_where,1,l_where_pos+6);
    l_where_post := substr(l_where,l_where_pos+7);
    l_where_post := 'week_ending = '||l_week_ending||' and '||l_where_post;
    l_where := l_where_pre || l_where_post;
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => '_DETAIL_WHERE_CLAUSE',
    p_value => l_where,
    p_index => 1);
    QueryDetail(
    p_mode => 'QUERY' ,
    p_session => p_session);
    end if;
    end;
    3> Click on OK to finish editing the form.
    4> Run the form - enter query criteria for the master fields and enter the week-ending criterion in the 1st detail
    field under Week Ending. Click the Query button.
    Advantage:
    You will not lose your changes even if you edit the form later on.
    Drawback:
    In this method, the querying process will be bit slow as we are querying for the detail records twice.
    Once through onQuery and the second time after constructing the new where clause with the additional conditon
    for the detail rows.
    Method 2
    ========
    This method requires altering the form generated package.
    Steps :-
    1> In the form package, you will find a onQuery procedure. Towards the end of the procedure, you will find a statement like
    "_detail_where_cond" := "_detail_where_cond" || ' WHERE ' || ...
    2> As the name of the variable suggests, this where condition will be used while querying the detail block. You need to
    add a new clause to this for the week_ending column. Prior to that you need to fetch the shadow value for A_WEEK_ENDING.
    3> Your altered code should look something like :-
    p_session.get_shadow_value(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_WEEK_ENDING',
    p_index => 1,
    p_value => l_week_ending,
    p_language => l_lang);
    if l_week_ending is not null then
    "_detail_where_cond" := "_detail_where_cond" || ' WHERE WEEK_ENDING = ' || l_week_ending || ' AND ' || --existing code
    else
    --- use the original code here
    "_detail_where_cond" := "_detail_where_cond" || ' WHERE ' || ...
    end if;
    4> Compile the package body and run the form.
    Advantage:
    In this method we will be querying the detail rows just once. Unlike in method 1.
    Disadvantage:
    You will lose your alterations once you create a new version of the form by editing it. You need to recompile the package
    after re-introducing your changes.

  • For Update Query from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    you can't dynamically add a query to the data model in reports.
    You should look into the XML based customization of Oracle Reports. This will enable you to define a report dynamically by creating a definition in XML.
    Also another option is to have the report with a query in it and use lexical parameters in reports to pass the query definition or just the where part of it.
    Look at the reports online help for both of these solutions.

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • Different LOVs in af:query and af:form for the same VO attribute

    Hi,
    We need to display different LOVs in af:query and af:form for the same attribute in VO.
    Is it possible to use LOV Switcher for this ?
    What condition can we use in LOV Switcher attribute to check if it is View Critearia row or VO row ?

    We have a VO attribute "User" which needs to be displayed as LOV in a Search Panel ( af:query component created using View Critearia ) and in a af:form.
    When this VO attribute is displayed in search panel, in LOV, we need to show all users.
    When this VO attribute "User" is displayed in a form for editing, in LOV, we need to show only active users.
    For this, we created two LOVs "ActiveUsersLOV" ( which shows only active users ) and "AllUsersLOV" ( which shows all users ) on VO attribute "User".
    LOVSwitcher attribute should return "ActiveUsersLOV" if the LOV is displayed in form and "AllUsersLOV" if the LOV is displayed in search panel.

  • 5200: Error executing query: The data form grid is invalid.

    Hi,
    I am getting this error " 5200: Error executing query: The data form grid is invalid. Verify that all members selected are in Essbase. Check log for details.
    com.hyperion.planning.HspException;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="Profit " dsid="228af2c3_129ca3dd85c_-77b1" allowEdit="1"><dim name="Period" dimIndex="1" dsName="Profit " keyDimName="Period" memberName="Apr" displayName="Period: Apr"/><dim name="Year" dimIndex="2" dsName="Profit " keyDimName="Year" memberName="FY10" displayName="Year: FY10"/><dim name="Entity" dimIndex="5" dsName="Profit " keyDimName="Entity" memberName="9999" displayName="Entity: 9999"/></datasource></datasources>"
    I have checked that both the systems essbase and planning are same. nothing's different. still i cannot find the exact reason why the report is not working.
    can any please help me.
    btw, i am using Hyperion Planning 9.3.1
    Thanks,
    BIMS

    Hi
    You probably deleted some members from outline that are used by report
    I would recommend you to open you report/grid via rep.client and try to find which elements are abcent
    Regards
    Alexander
    Edited by: Softperson on 19/8/2010 17:38

  • All my PDF forms are automatically transformed in Word forms,how can I change that and only choose the PDF I want to transform

    All my PDF forms are automatically transformed in word forms,how can I change that and only decide which PDF to be transformed in word

    Hi Ulfsch,
    Thank you for posting on the Adobe Forums, kindly try the step mentioned below.
    1) Right click on any of the PDF file and choose the option open with
    2) Select choose default program
    3) Select Adobe Reader/Acrobat from the list
    5) Check the box "always open this type of file with selected program" (not the exact same wording)
    6) Click OK
    If you are on Mac, CTRL+Click on the file.
    Go to Get info
    Go to Open with
    Change it to Adobe Reader/Acrobat and click change all.
    Thanks,
    Vikrantt Singh

  • Help in Ad-hoc query and Hr form editor

    any body have material links of Ad-hoc query(it means how the reports are generated with Ad-hoc query) and Hr form editor(with examples) plz forward it to me???????????

    Hi,
    HR Ad Hoc Query is the special version of InfoSet Query with the HR object selection.
    You can find the system documentation here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/f9/cc9138e4a0341fe10000009b38f8cf/frameset.htm
    However I doubt the use of documentation of the query generator. So what is your concrete question?
    Or in any R/3 via application help of transaction SQ01.
    Also HR580 is a good course.
    Regards,
    Michael

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • Automate the database and forms / reports services to start on windows 2008 server R2 startup

    Dear memebers,
    I want to automate the database and forms / reports services to start on windows 2008 server R2 startup. whats the possibilities and which method is the best?
    Regards:

    Hi,
    type services.msc at run
    then check for Oracle Services--> Right Click-->Properties-->Startup type-->start automatic
    HTH

  • Automate filling a PDF Form

    Hi All
    I have Adobe acrobat Standard installed on my system and i want to automate filling a PDF Form.
    While doing this am not able to get any of the field names. Here is the peice of code i used, can any one help me out what i need to do?
    Set AcroExchApp = CreateObject("AcroExch.App")
      AcroExchApp.Show
      Set AcroExchAVDoc = CreateObject("AcroExch.AVDoc")
      OK = AcroExchAVDoc.Open(Filename,"")
      Set PDDoc = AcroExchAVDoc.GetPDDoc()
      Set jso = PDDoc.GetJSObject
      Set AFormAut = CreateObject("AFormAut.App")
      Set Fields = AFormAut.Fields
      'Set f = jso.getField(FieldName)
      For Each Field In Fields
          FieldName = Field.Name
          Set f = jso.getField(FieldName)
          f.value = "Hello"
      Next
    Here am not able to enter into the loop.
    One more thing when ever i get Field name using Field.Name method i want to high light that particular field. Is any one has any kind of method for highlighting all the fields.
    Thanks in Advance..

    Hi,
    If you set the font size of the text field value (not the caption) to zero then the text will shrink to fit.  This can be set in the font palette.  But this can reduce the text so small that it can't be read.  If you are developing a dynamic form then you can set the text field to expand to fit (in the layout palette), just make sure the containing subform is set to flowed, when the user exits the field it will expand to fit all text.
    Regards
    Bruce

  • Can i use case in query in oracle form 6i

    sir can i use case in query in oracle form 6i
    such as
    select empno, case when deptno=10 then dptno end from emp;
    please gice me

    Hello,
    Does this code compile ?
    If not, I'm afraid that the PL/SQL engine of Forms6i does not recognize this syntax.
    Francois

Maybe you are looking for

  • My Master Drive @ 10.4.8 won't boot up now - It auto boots to Backup Drive

    As of this morning when I booted up to my Master SATA drive (10.4.8) my secondary ATA drive (Backup OS 10.4) came up instead. This happened before several weeks ago and when I just restarted it booted up with the correct Master drive instead. This ti

  • ITunes no opening when phone connected.

    I have two iPhones running from one account on a PC and using iPhone 3gs with 3.1.1. When I connected the phone to the PC it always used to open iTunes. Now in iTune under 'Options' the option to ' Open iTunes when this phone is connected' is grayed

  • (Oracle 8 and 9) UTF16 char stream and OCIStmtPrepare

    Hi, I am using Oracle 8.1.7 on windows (should soon use Oracle 9.2) and Oracle 10g on MacosX. I have an UTF16 strings in buffers containing SQL commands (like Create tables, or insert, ...) . some of the string contains some real weird characters (su

  • How can send servlet out put to jsp

    Hi friends, my problem is .. 1.In my jsp (let us assume that Test.jsp ) emded tag which emding out put from Servlet.. like <embed name="svg" border="1" type="image/svg+xml" width="100%" height="100%" src="http://localhost:8080/demo/Test?"/> here the

  • Illustrator cs6 zoom problem cinteq 24hd touch

    i have problems with the zoom function illustrator cs6. i am using a cinteq 24hd touch and macbook pro latest software. i can zoon out with the wheel and touch but the zoom to does't work. can somebody help me?