How to update data in third SQL query type report (M-D are first two!)

I have page made through M-D Form wizzard.
Third report (let's call it detail2) shows same fields as detail grid but some fields are "Standard Report column"-not editable as records in detail1 report. WHERE part in both detail reports are opposite. So together details reports show the whole set of detail records but they never show twice the same detail record (they are mutually exclusive).
In detail2 I allow just update on one field "NAME".
I cannot use MRU process-I think it is impossible on such a pages-at least I cannot make it work.
So I tried different approach creating report like:
select
  htmldb_item.hidden(3,ID) IDH,
  htmldb_item.text(4,NAZIV,78) "SADRZAJ"
from "#OWNER#"."MYTABLE"
where "QUESTION_ID" = :P13_ID AND "....mutual condion..."<br>Executing "for i in 1..htmldb_application.g_f04.count loop " I can retrieve values of "Naziv" field-this is not a problem!
But it seems that "ID" from detail2 report is not easy to retrieve....Looks like that first detail is somehow involved!
<br>I tried some things and what I get for now is following. If I execute process like:
for i in 1..htmldb_application.g_f01.count loopI get following result (each row is record):
  2-<input type="hidden" name="f03" value="137" />
  1-<input type="hidden" name="f03" value="734" />, "1" and "2" are ordinal numbers of rows where ID's are "137" and "734". This looks promising but far away from easy referencing!
<br>So my question is: How to retrive those values from output like shown above?? Any other hint is welcome!!
THX!
<br>P.S.
<br>One straight question:
<br>IS THERE ANY DEMO FOR MASTER-DETAIL FORM WITH THIRD REPORT ON IT??
<br>
<br>P.S. II
Collection is probably not a solution because I do not want to update field on other page (like shown in Collection example on Emp table)...

Okay, I understand now.
Using Firefox or doing a View Source, you should be able to find out what the last fXX number is, and when coding your 3rd detail form, start like 10 digits higher, i.e., if the last fXX number is f23, I'd start with probably htmldb_item.text(35....). This approach should work, but I have never tried it.
To me, the basic functionality from the M-D wizard is nice, but adding a third report complicates things enough that I'd probably manually code both the 2nd and 3rd reports. would mean more work with the validations and processes, but I think for this situation it would be more flexible, allowing you greater control. For your manually created detail reports (I'd do both manually), I would skip some numbers between the first and second reports, i.e. first detail report uses htmldb_item.xxxx(1......) through htmldb_item.xxxx(9.....) and then I would start the next detail report as htmldb_itemxxxx.(20....).
Regarding your example, to 'retrieve' the values of the ID column (htmldb_item.hidden(3,ID)), you should be able to get it through the loop process you described above, htmldb_application.g_f03(i).
Like:
for i in 1..htmldb_application.g_f02.count
loop
if htmldb_application.g_f03(i) is not null AND htmldb_application.g_f04(i) is not null then
-- do whatever processing you want to do, insert, updates, etc.
end if;
end loop;
Whatever number you use in the htmldb_item specification is also how yuo refer to it in htmldb_application:
htmldb_item.XXXX(1....) = htmldb_application.g_f01
htmldb_item.XXXX(3....) = htmldb_application.g_f03
etc.
Use the looping mechanism to (I used (i) in my example above) to go through each row and retrieve that row's value.
Sorry if any of the above is already familar to you. Judging by what posts I remember of your's, it seems that some of this you already know, but I guess it's better than assuming you do and leaving some stuff out that you didn't know.
Hope this helps.
Bill Ferguson

Similar Messages

  • How to add a parameter to sql query in report

    Hi
    How to add a parameter to sql query in report.
    Parameter is from Visual studio
    example:
    select * from tab1 where dl=parameter???
    I have VS 2008 prof CR XI R2, mysql

    Hello,
    If you have this API available then you can modify the record selection formulae in code to add filtering:
              string recordSelectionFormula = "{T_INV_RPT_ADDR.IND_PROMUS} = {?P_PROMUS?} AND {T_INV_RPT_POINT.INVOICE_DATE} = DATE(2008, 05, 31) AND {T_INV_RPT_POINT.CHECKOUT_DATE} = date(2008, 04,29)";
                CrystalDecisions.CrystalReports.Engine.ReportDocument.RecordSelectionFormula = recordSelectionFormula;
    You have to format and follow the rules as in the Designer so not too much work to get this to work.
    CR for .NET may not have the ability so you will need to upgrade to a Developer version of Crystal Reports.
    Thank you
    Don

  • SQL Query (updateable report) - Can't figure out how to make one

    Hi folks,
    Can someone tell me how to make a report where the data can be updated? Not an interactive report, a SQL report that selects only one row. The only options in the drop down I see are "SQL Query" and "SQL Query (PL/SQL function body returning SQL query)", but I have a report elsewhere that says it's type is "SQL Query (updateable report)", but I can't remember how to do it :(
    Thanks very much,
    -Adam

    Hi Adam,
    An Updatable Report is a "Tabular Form" - see: http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/frm_tabular.htm#CHDFBHDB
    Andy

  • Update Field On Change For A SQL Query (updateable report)

    Hi,
    I'd like to request help from anyone with ideas on how to solve this.
    We are using APEX 4.2, 10GR2, RedHat5.
    I have a report that comes from SQL Query (updateable report).
    I'm using the apex_item.text and apex_item.hidden on fields.
    I'm using a button to submit and after submit process to add some logic that I need.
    There could be 1 - 10 records in the report.
    There is only 1 field that is needed to enter a value, but the value of this field determines the value of another field.
    I think that I can do this with a submit button and an after submit process where I loop through all the records. I think I have this handled.
    This is the question
    When the value of that field is changed then the value of another field in the same row changes immediately.
    Is this possible?
    All the examples I've seen so far are for a single record and that doesn't work for us.
    I guess this is a MRU process but I haven't seen an example where a dynamic action is possible on a Multi Row Update.
    Could anyone direct me to where I can see an example or help me get directions?
    I appreciate all your help an comments and I thank you in advance.

    Yes why not...what you looking for is a ajax call
    See {message:id=10390979}
    Please note:-you can also do this as a dynamic action as shown below
    Event: Change
    Selection type: jQuery Selector
    jQuery Selector: input[name="f01"]
    True action with Execute JavaScript Code and put all code inside the test funtion, you may need to amend the code to use this.triggeringElemnt in place of this

  • SQL Query updateable report with row selector. Update process.

    I have a SQL Query updateable report with the row selector(s).
    How would I identify the row selector in an update process on the page.
    I would like to update certain columns to a value of a select box on the page.
    Using the basic:
    UPDATE table_name
    SET column1=value
    WHERE some_column=some_value
    I would need to do:
    UPDATE table_name
    SET column1= :P1_select
    WHERE [row selector] = ?
    Now sure how to identify the [row selector] and/or validate it is checked.
    Thanks,
    Bob

    I don't have the apex_application.g_f01(i) referenced in the page source...In the page source you wouldn't find anything by that name
    Identify the tabular form's checkbox column in the page(firebug/chrome developer panel makes this easy)
    It should be like
    &lt;input id=&quot;...&quot; value=&quot;&quot; type=&quot;checkbox&quot; name=&quot;fXX&quot; &gt;we are interested in the name attribute , get that number (between 01 and 50)
    Replace that number in the code, for instance if it was f05 , the code would use
    apex_application.g_f05
    --i'th checked record' primary keyWhen you loop through a checkbox array, it only contains the rows which are checked and it is common practice to returns the record's primary key as the value of the checkbox(available as the the i'th array index as apex_application.g_f05(i) , where i is sequence position of the checked row) so that you can identify the record.

  • Can we use Data Pump to export data, using a SQL query, doing a join

    Folks,
    I have a quick question.
    Using Oracle 10g R2 on Solaris 10.
    Can Data Pump be used to export data, using a SQL query which is doing a join between 3 tables ?
    Thanks,
    Ashish

    Hello,
    No , this is from expdp help=Y
    QUERY                 Predicate clause used to export a subset of a table.
    Regards

  • How to present results from a sql-query in java

    Hi - I'm having problems finding out how to present data from a database-query in a nice looking way in a JFrame. Want to present them similar to the way they are presented in the database. Is there an easy way doing this?

    Tried to use a JTable, but it's difficult when data in the table should be able to change all the time, i.e the number of rows. What is a Html-table? Can i use it in an application?

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi,
    I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
    I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
    Thanks

    Tou need to do a couple of things
    1. On the Essbase server, set up an odbc system connection to your MySQL database
    2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
    The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it

  • How to get this output using sql query?

    Hi,
      How to get this output using sql query?
    Sno Name Age ADD Result
    1 Anil 23 delhi Pass
    2 Shruti 25 bangalor Pass
    3 Arun 21 delhi fail
    4 Sonu 23 pune Pass
    5 Roji 26 hydrabad fail
    6 Anil 28 delhi pass
    Output
    Sno Name Age ADD Result
    1 Anil 23 delhi pass
    28 delhi pass

    Hi Vamshi,
    Your query is not pretty clear.
    write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
    Regards,
    Kannan

  • How to hide repeated details using SQL Query?

    How to hide repeated details using SQL Query?
    For Ex:
    ------------------------+
    DEPTNO| ENAME | JOB |
    ------|-------| --------|
    10 | JAMES | MANAGER |
    10 | BLAKE | CLERK |
    10 | FORD | SALESMAN|
    20 | SCOTT | MANAGER |
    20 | ADAMS | CLERK |
    20 | KING | SALESMAN|
    ------------------------+
    How we can display the above details in the following way?
    ------------------------+
    DEPTNO| ENAME | JOB |
    ------|-------| --------|
    10 | JAMES | MANAGER |
    | BLAKE | CLERK |
    | FORD | SALESMAN|
    20 | SCOTT | MANAGER |
    | ADAMS | CLERK |
    | KING | SALESMAN|
    ------------------------+
    Thanks Advance

    Hi,
    you can use BREAK ON DEPTNO in SQL*Plus or use LAG.
    SQL> ed
    Wrote file afiedt.buf
      1  select nullif(department_id
      2                , lag(department_id) over (partition by department_id order by last_name)
      3         ) dept_id
      4  , last_name, job_id
      5*  from employees where department_id in (30,50) and rownum <=10
    SQL> /
       DEPT_ID LAST_NAME                 JOB_ID
            30 Baida                     PU_CLERK
               Colmenares                PU_CLERK
               Himuro                    PU_CLERK
               Khoo                      PU_CLERK
               Raphaely                  PU_MAN
               Tobias                    PU_CLERK
            50 Fripp                     ST_MAN
               Kaufling                  ST_MAN
               Vollman                   ST_MAN
               Weiss                     ST_MAN
    10 rows selected.

  • SQL Query (updateable report) Region - Conditionally Hide and Set Values

    SQL Query (updateable report) Region - Conditionally Hide and Set Values
    Outline of requirement :-
    Master / Detail page with Detail updated on same page using SQL Query (updateable report).
    The detail region has the following source
    SELECT item_id,
           contract_id,
           CASE WHEN hardware_id IS NOT NULL THEN
                   'HA'
                WHEN backup_dev_id IS NOT NULL THEN
                   'BD'
                WHEN hardware_os_id IS NOT NULL THEN
                   'HS'
           END item_type,
           hardware_id,
           backup_dev_id,
           hardware_os_id
    FROM   "#OWNER#".support_items
    WHERE  contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
    CREATE TABLE SUPPORT_ITEMS
      ITEM_ID         NUMBER                        NOT NULL,
      CONTRACT_ID     NUMBER                        NOT NULL,
      HARDWARE_ID     NUMBER,
      BACKUP_DEV_ID   NUMBER,
      HARDWARE_OS_ID  NUMBER
    )A check type constaint on support_items ensures that only one of the fk's is present.
          (    hardware_id    IS NOT NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NOT NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NOT NULL
          )    Hardware_Id is a FK to Hardware_Assets
    Backup_dev_id is a FK to Backup_Devices
    Hardware_os_id is a FK to Hardware_op_systems
    The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
    Display Value     Return Value
    Hardware Asset    HA
    Backup Device     BD
    Computer System   HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
    What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
    Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
    Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
    Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
    There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
    Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
    What's the best way of implementing this requirement in APEX 3.1?
    Thanks.

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
    I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far...

  • Get a insert session value for SQL query at report

    Hi friends
    I created a global temp table and procedure to support web search form.
    and a search result report. The procudure
    gets search result from multip tables and
    insert into temp table --recordsearch. I can get value from temp table  by call procedure
    at SQL*Plus.
    However, I can not get this value by web report.
    How can I get this insert session value and pass to SQL query for report?
    Thanks,
    Newweb
    CREATE GLOBAL TEMPORARY TABLE recordsearch
    (emp_id          VARCHAR2(200),
    ssn               VARCHAR2(9),
    fname          VARCHAR2(200),
    lname           VARCHAR2(200),
    m_name          VARCHAR2(200)
    ) ON COMMIT PRESERVE ROWS;

    it possible that your web form does not have a persistent, dedicated connection. if you have connection pooling for example, multiple sessions will see the same instance of the GTT, so if one deletes it, then nobody sees it (or you can see others data). if the connections are not persistent, then they can disconnect between calls, deleting the GTT table.

  • Create a validation for SQL Query (updateable report)

    Hello
    I have a need for creating a validation on a SQL Query (updateable report)- type region
    1)
    When a row get populated i don't want same values to be populated in the second row.(as shown in first 2 rows)
    Also, I don't want to have a value that falls in range in between 100 and 1000 for the period falls in the previous. (as shown in third row)
    i.e
    Type_id
    Lower_Limit        Upper_Limit           Date_From       Date _To
    1
    100                      1000                   1/1/2013        12/31/2013
    2
    100                      1000                    1/1/2013        12/31/2013
    3
    101                       500                    2/1/2013        10/31/2013
    appreciate any help
    thanks
    kp

    This example could help:
    http://apex.oracle.com/pls/otn/f?p=31517:214
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Setting the cell width in a Tabular Form (SQL Query (updateable report) )

    version 3.2.1
    I have a Tabular Form (SQL Query (updateable report) ) and I have a column that is a VARCHAR2(4000) that when displayed extends the cell to the full length (which of course makes sense).
    How can I set the width of this cell to something like 30 or 50 and wrap the contents?
    Thanks,
    Joe

    Scott,
    Thank you for replying.
    Your suggestion kinda worked. I say kinda because when the report is first displayed the cell is the full width and appears to ignore the width setting. There is a Select List on the report to restrict some of the data that is displayed. When a selection is made from this Select List, it appears that the cell width is then adjusted to what was set, but not for every selection from this Select List.
    I made the width entry in Tabular Form Element - Element Width
    Any idea why the width setting is ignored?
    Thanks,
    Joe

Maybe you are looking for

  • 120GB dead. Big red X. How can I save my  10000 songs?

    Hi guys, I need your help badly. My iPod classic 120gb died on me. Red x. Computer won't recognize it. I have +10000 songs on that iPOd and that iPod alone. I am a music freak. Some of those songs were really hard to find. And I can't remember 10.000

  • What wrong with my XY graph?

    I try to using XY graph, but I can't shift the value. What is wrong? Attachments: naamloos1.JPG ‏158 KB try000.vi ‏28 KB

  • Transporting DataSources in (ECC) problem

    Hi SCN, Just wanted to ask if these are only the two important nodes when collecting and transporting an enhanced datasource? I am currently transporting datasources from ECC DEV to ECC QAS. When reviewing my datasources in QAS, append structures wer

  • 9.0.3 Preview - Class not found error after including jsp:useBean

    Hi, I got a Java.lang.NoClassDefFoundError while compiling a JSP Page, after including a simple web bean as follows: <jsp:useBean id="catviews" scope="request" class="CategoryView" /> <jsp:setProperty name="catviews" property="*" /> somewhere within

  • Photoshop 7.0 Wierdness

    I use Photoshop 7.0 primarily for drawing. I'm currently working on a monotone drawing that must be reproduced in different "tints". My issue is that a file I created of an image in a brown tint is about 10X as big as several other files of the same