SQL Query (report region) without full page reset

Hello,
I have a page with several items, some of them with default values, and a report region, performing SQL query based on one of the items – text field (always submits page when Enter pressed). When the page submits, the HTML DB engine performs and display the query, but at the same time, reset the other page items to their default values.
Is it possible to run the query without the HTML DB reset the item values to their default state?
Thanks,
Arie.

Hi Peter,
Well, this is not exactly the case. I have an Item – File Browse – which defined as "Only when current value in session state is null", and a HTML text region, which contain Iframe, with default src tag (which I'm changing, using JavaScript, prior to the running of the SQL query). After running the query – in a report region – both the item and the Iframe reset to their original state.
Any Ideas on how to prevent that?
Thanks,
Arie.

Similar Messages

  • SQL Query report region that only queries on first load

    Hello all,
    Is there any way in which you can prevent a SQL Query report region from quering data after every refresh?
    I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to show the change, but every time I reload the page the columns are queried and the original values are displayed once again...
    any ideas?
    -Mux

    Chet,
    I created a header process to create the HTMLDB_COLLECTION. It is something like:
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'Course_Data',
    p_query => 'SELECT DISTINCT COURSE_ID, HTMLDB_ITEM.CHECKBOX(14,COURSE_ID) as "checker", TITLE, SUBJECT, COURSE_NUMB, SECTION, ENROLLED, null as "temp_term", null as "temp_title", null as "temp_crse_id", null as "temp_subj", null as "temp_crse_numb", null as "temp_sect", FROM DB_TBL_A, DB_TBL_B, DB_TBL_C, DB_TBL_D, DB_TBL_E, DB_TBL_F WHERE ...');
    The names were changed, for obvious reasons.
    I then created an SQL Report Region to see if it would work. The SQL is:
    SELECT c001, c002, c003
    FROM htmldb_collections
    WHERE collection_name = 'COURSE_DATA'
    When I run the page it says:
    ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    Any idea why this is happening?
    I'm new to HTMLDB_COLLECTIONS, so I may be doing something wrong
    -Mux

  • Displaying a radio group in SQL QUERY report region

    Good morning everyone,
    I have a report in which a column - ORDER STATUS, will come in with a value of 1, 2 or 3...being order unfilled, order partially filled, or order filled, respectively.
    I would like to display the order status as a radio group on the report so that it will be easy to run down the column of radio buttons to see what is filled, etc.
    I've gone to the manual and checked the doco on HTMLDB_ITEM.RADIOGROUP. But the example given there is actually for CHECKBOX (is this an error?!?).
    I went to the forums and found nothing suitable.
    My region is an SQL QUERY. Can I display the STATUS as a radio group in the SELECT ?
    This is the question.
    Thankyou in anticipation. TC. 23/11/2004

    Tony,
    There may be better solutions, but here's what I was thinking:    create table orders (id number, status number, customer varchar(30))
        insert into orders (id,status,customer) values(1,1,'ACME')
        insert into orders (id,status,customer) values(2,2,'BENSON')
        insert into orders (id,status,customer) values(3,3,'CLARKE')
        commit
        Query Source
        select
          id "ORDER NUMBER",
          decode(status,
            1,htmldb_item.RADIOGROUP(1,status,'1','unfilled')||htmldb_item.RADIOGROUP(2,status,'2','partial','"disabled=true"')||htmldb_item.RADIOGROUP(3,status,'3','filled','"disabled=true"'),
            2,htmldb_item.RADIOGROUP(1,status,'1','unfilled','"disabled=true"')||htmldb_item.RADIOGROUP(2,status,'2','partial')||htmldb_item.RADIOGROUP(3,status,'3','filled','"disabled=true"'),
            3,htmldb_item.RADIOGROUP(1,status,'1','unfilled','"disabled=true"')||htmldb_item.RADIOGROUP(2,status,'2','partial','"disabled=true"')||htmldb_item.RADIOGROUP(3,status,'3','filled'))
          "STATUS",
          customer "Customer Name"
        from orders;Scott

  • Selecting values between 2 dates for an SQL query report region

    I have a region where im selecting between 2 dates
    select hp.NAME, hp.VALUE, hp.UPDATEDATE, hp.DESCRIPTION, hp.UPDATE_COMMENT, hp.HASH, hp.IDCATEGORY
    from HIST_REPORT hr, HIST_PARAM hp
    where hp.dbid = hr.dbid and hr.id = :P7_ID and hp.UPDATEDATE between :P7_BDATE and :P7_EDATE
    The problem is that if I have a row thats dated today (april 1) and if I set the beginning date (BDATE) to april 1 as well as the ending date (EDATE), no rows show and I would like the april 1 row to show. How can I modify my query to fix this?

    and hp.UPDATEDATE between :P7_BDATE
        and decode(:P7_EDATE,:P7_BDATE,:P7_EDATE+1,:P7_EDATE)This assumes, though, that the time component of your items is implicitly 00:00.
    Joel

  • Setting a Default Value in SQL Query Report

    Hello:
    We are using a SQL Query Report to provide a mass update to a table. We are using the apex.collection and having it display a number of records in a SQL Query Report for mass update. We have 14 columns in the report, for which the first 11 are populated via the collection. The remaining 3 are open for input but the individual making the updates. We've were able to provide a default value for 2 of the remaining 3 columns using a named LOV's - however the fourth column we would like to default a sysdate - but we are not successful.
    We've attempted many things but none seem to work, including adding that column to the collection and assigning it a default sysdate value. We've also tried changing the settings in the report attributes --> Tabular Form Elements by setting the Display as to: Datepicker, Default type to PL/SQL Expression and setting the default to sysdate. We've also tried caputuring a date on the previous page and loading it onto the report page and trying to default the date column to a page item default.
    I'd appreciate any help.
    Thanks
    FYI - we are using version 3.2

    use as default
    to_char(sysdate, 'dd/mm/yyy') where the format is your application or item date format

  • SQL Query Report Very slow

    Hi I have a sql query report that is taking very long to render.The query on sql developer comes back in less than a second.Any ideas on what could be wrong?

    Hi
    When posting code on the forum, put {noformat}{noformat} (with the curly brackets and the word code in lowercase) above and below your code like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    It will then appear like this, preserving formatting...SELECT *
    FROM emp
    Next, how many rows are returned in total, it may be that you have SQL Developer set up to fetch only the first x number of rows?
    Why have you put a CHOOSE hint in there?
    Is it a classic report or an interactive report?
    It looks like you're going over a database link, you really need to provide an explain plan (formatted as I have detailed above), a DRIVING_SITE hint may help you but it's impossible to know without seeing the plan...
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to refresh captcha without full page refresh

    Hi,
    I am using simple captcha implementation using the following link.
    [http://www.oracle.com/technetwork/developer-tools/jdev/captcha-099103.html|http://www.oracle.com/technetwork/developer-tools/jdev/captcha-099103.html]
    Captcha image refreshes page reload but if i set partialSubmit=true It does not changes the image of the servlet . What is the way to refresh image .
               <af:image  id="iCaptcha"     
                                            source="/captchaservlet"
                                            inlineStyle="width:122px; height:49.0px;"
                                            partialTriggers="cil2"
                                            binding="#{AfProMSDSSearchAction.captchaImage}"/>When I reset the image source by reseting it by javascript it does not refreshes .
      <af:resource type="javascript">
              function loadCaptchaImage() {          
                var captchaURL = "/captchaservlet?rand=" + Math.random();           
                parent.document.getElementById("pt1:s12:iCaptcha").src=captchaURL;
            </af:resource>

    Hi frank,
    I got the solution I can change the Captcha image without full page refresh by just adding temparary request parameter to that image so that url changes and it calls servlet again.
    Below code will add random number as a request parameter to the servlet url so that url changes everytime.
                    RichImage image = (RichImage)JSFUtils.findComponentInRoot("iCaptcha");
                    String randomString= String.valueOf(Math.random());
                    image.setSource("/captchaservlet?rand="+randomString);          
                    RichPanelGroupLayout capImgPGL = (RichPanelGroupLayout)JSFUtils.findComponentInRoot("capImgPGL");
                    AdfFacesContext.getCurrentInstance().addPartialTarget(image);
                    AdfFacesContext.getCurrentInstance().addPartialTarget(capImgPGL);

  • Fail to create SQL query report because of ORA-00923

    Hi expert,
    I would like to SQL query report using the following query:
    select min(identified_date) first_identified,
    max(actual_COMPLETE) last_closed,
    count(id) total_issues,
    sum(decode(status,'Open',1,0)) open_issues,
    sum(decode(status,'Pending',1,0)) pending_issues,
    sum(decode(status,'Resolved',1,0)) closed_issues,
    sum(decode(status,'Will Not Resolve',1,0)) not_resolve_issues,
    sum(decode(status,
    'Open',decode(priority,null,1,0),
    0)) open_no_prior,
    sum(decode(status,
    'Open',decode(priority,1,1,0),
    0)) open_prior_1,
    sum(decode(status,
    'Open',decode(priority,'2',1,0),
    0)) open_prior_2
    sum(decode(status,
    'Open',decode(priority,3,1,0),
    0)) open_prior_3,
    sum(decode(status,
    'Open',decode(priority,'4',1,0),
    0)) open_prior_4,
    sum(decode(status,
    'Open',decode(priority,5,1,0),
    0)) open_prior_5
    from SOFTPROJ_issues
    where project_id = :P83_PROJECT
    However, I got the following error during the steps of creation:
    1 error has occurred
    Query cannot be parsed, please check the syntax of your query. (ORA-00923: FROM¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿)
    I wonder why if it is getting the error because I could create the report with the following query without problems:
    select min(identified_date) first_identified,
    max(actual_COMPLETE) last_closed,
    count(id) total_issues,
    sum(decode(status,'Open',1,0)) open_issues,
    sum(decode(status,'Pending',1,0)) pending_issues,
    sum(decode(status,'Resolved',1,0)) closed_issues,
    sum(decode(status,'Will Not Resolve',1,0)) not_resolve_issues,
    sum(decode(status,
    'Open',decode(priority,null,1,0),
    0)) open_no_prior,
    sum(decode(status,
    'Open',decode(priority,1,1,0),
    0)) open_prior_1,
    sum(decode(status,
    'Open',decode(priority,3,1,0),
    0)) open_prior_3,
    sum(decode(status,
    'Open',decode(priority,5,1,0),
    0)) open_prior_5
    from SOFTPROJ_issues
    where project_id = :P83_PROJECT
    1 error has occurred
    Query cannot be parsed, please check the syntax of your query. (ORA-00923: FROM¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿)
    The difference is to add the followings only:
    sum(decode(status,
    'Open',decode(priority,'2',1,0),
    0)) open_prior_2
    sum(decode(status,
    'Open',decode(priority,'4',1,0),
    0)) open_prior_4,
    Does anyone have any idea to resolve the issue?
    Thanks in advance,
    Rui

    By putting a comma after open_prior_2:
    sum(decode(status,
    'Open',decode(priority,'2',1,0),
    0)) open_prior_2,Sima

  • How do you select a clob column in an SQL query report?

    I must be missing something fundamental as there is practically no help on this on the forum.
    All I want to do is ...
    select numcol,aclob_col from table
    in an SQL Query report.
    Sounds easy??? I get no data appearing in the clob column. Doesn't work in SQL Workshop either. What's the catch??
    regards
    Paul P

    Paul,
    It works when I try it. What version of Application Express, what is the table DDL, the exact query, and how much data is in the clob columns?
    Scott

  • SQL Query Report (Customize link)

    I have an SQL query report with bind variables so that users can choose conditions for the query. If I don't have any conditions, the report is empty. How do I get it to display all the records. I tried typing * but it didn't work.
    Basically I want it to act like the Query Wizard's Customize feature. The report give me all the records. I can query one field or all the fields.
    In the SQL report's Customize feature, I have to enter a value for all the bind variables I have. What if I just want to query one field. What do I put in the others to indicate that I want all. I hope this makes some sort of sense and that someone out there knows what I'm blabbing about.

    Hi,
    I h've same type of requirement in most of my reports in the application and I h've solved this in the sql of the report itself. Let's see a example report from the table scott.emp with a sql like
    Select EMPNO,
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    DEPTNO
    From scott.emp
    Where EMPNO = nvl(:v_empno,EMPNO)
    and DEPTNO = nvl(:v_deptno,DEPTNO)
    where :v_empno and :v_deptno are bind variables to this report and if there is no arguements passed to these arguements all the records will be retrieved from the table ..likeley if value for any one of these arguements is passed then this sql will return only those records which meet that condition.
    Hope this helps
    -Krishnamurthy

  • Apex - SQL query report.

    Hi,
    Apex - 4.0 and Oracle -11g
    I m having a SQL Query report.
    Query
    SELECT htmldb_item.hidden(1,id) id,
      htmldb_item.select_list_from_query_xl(2,name,'SELECT name ,                                                              
    deptid                                                     
    FROM  emp                                                     
    WHERE name like ''E%''') name,
      htmldb_item.select_list_from_query_xl(3,deptname,'SELECT  deptname from dept where deptid =   ???') deptname
    FROM tabel
    My problem, in the report when the Select list for 'name' has been choosen , then it should retrieve the deptname based on the 'name'.
    Is it possible ?

    you want  select list value should affected in SQL report? i mean redirect and set value to SQL report?

  • Non scrollable headers for multiple report regions on a page. Please help!!

    Hi everyone,
    I am having two report regions on my page and am trying to have the static/non scrollable headers for both the report regions. I followed on of the threads in the forum and was able get the static headers for one region, but am not able to for second region. I put my app on apex :
    http://apex.oracle.com/pls/otn/f?p=38724:1:1083512384327081:::::
    workspace:sk
    username : guestdev
    password :guestdev
    Can anyone please help me? Appreciate your help.
    regards,
    Suma.

    Hello Suma,
    The first parameter of the MakeStaticHeader() function is your table id, and it defines the "playground" of the function. If you want to apply static headers to two reports, you need to define two unique IDs, one for each report.
    Change your SKstandard… report template, and define the table ID to be "table_grab1". Duplicate this template, and change the ID to be "table_grab2". Applied the templates to your reports, and use the correlated IDs as parameters to the MakeStaticHeader() function.
    Regards,
    Arie.

  • Set Page item value when paging through an sql query report

    I have a report that includes a checkbox to indicate which rows a process is to be run on. I have a "Select All" button that sets a value to check all boxes in the report, and deselect button to turn that feature off. The page only renders one of the buttons at a time depanding on the value. If the "Select All" is turned on, I would like to set the value to "OFF" when a user goes to another page of the report.
    For example:
    A user enters the page and the report is rendered. The rows returned are greater than what is displayed. The paging options for the report are shown. 1-15 16-30 etc. It is currently showing the first 15 rows of the report.
    The user clicks the select all button, and all checkboxes are now checked. Currently it will remain this way until the deselect button is clicked.
    When the user clicks the report paging, I would like to set the value of the Select All item to off.
    Does anyone know how to do this at this point?

    Hi,
    Try Scott's suggestion in Re: How to get query from region "PL/SQL function body returning string query"?
    Andy

  • ORA-01489 Received Generating SQL for Report Region

    I am new to Apex and I am running into an issue with an report region I am puzzled by. Just a foreword, I'm sure this hack solution will get a good share of facepalms and chuckles from those with far more experience. I welcome suggestions and criticism that are helpful and edifying!
    I am on Apex 4.0.2.00.07 running on 10g, I believe R2.
    A little background, my customer has asked an Excel spreadsheet be converted into a database application. As part of the transition they would like an export from the database that is in the same format as the current spreadsheet. Because the column count in this export is dynmic based on the number of records in a specific table, I decided to create a temporary table for the export. The column names in this temp table are based on a "name" column from the same data table so I end up with columns named 'REC_NAME A', 'REC_NAME B', etc. (e.g. Alpha Record, Papa Record, Echo Record, X-Ray Record). The column count is currently ~350 for the spreadsheet version.
    Because the column count is so large and the column names are dynamic I've run into a host of challenges and errors creating this export. I am a contractor in a corporate environmentm, so making changes to the apex environment or installation is beyond my influence and really beyond what could be justified by this single requirement for this project. I have tried procedures and apex plug-ins for generating the file however the UTL_FILE package is not available to me. I am currently generating the SQL for the query in a function and returning it to the report region in a single column (the user will be doing a text-to-column conversion later). The data is successfully being generated, however, the sql for the headers is where I am stumped.
    At first I thought it was because I returned both queries as one and they were joined with a 'union all'. However, after looking closer, the SQL being returned for the headers is about +10K+ characters long. The SQL being returned for the data is about +14k+. As mentioned above, the data is being generated and exported, however when I generate the SQL for the headers I am receiving a report error with "ORA-01489: result of string concatenation is too long" in the file. I am puzzled why a shorter string is generating this message. I took the function from both pages and ran them in a SQL command prompt and both return their string values without errors.
    I'm hopeful that it's something obvious and noobish that I'm overlooking.
    here is the code:
    data SQL function:
    declare
      l_tbl varchar2(20);
      l_ret varchar2(32767);
      l_c number := 0;
      l_dlim varchar2(3) := '''|''';
    begin
      l_tbl := 'EXPORT_STEP';
      l_ret := 'select ';
      for rec in (select column_name from user_tab_columns where table_name = l_tbl order by column_id)
      loop
        if l_c = 1 then
            l_ret := l_ret || '||' || l_dlim || '|| to_char("'||rec.column_name||'")';
        else
            l_c := 1;
            l_ret := l_ret || ' to_char("' || rec.column_name || '")';
        end if;
      end loop;
        l_ret := l_ret || ' from ' || l_tbl;
      dbms_output.put_line(l_ret);
    end;header sql function:
    declare
      l_tbl varchar2(20);
      l_ret varchar2(32767);
      l_c number := 0;
      l_dlim varchar2(3) := '''|''';
    begin
      l_tbl := 'EXPORT_STEP';
      for rec in (select column_name from user_tab_columns where table_name = l_tbl order by column_id)
      loop
        if l_c = 1 then
            l_ret := l_ret || '||' || l_dlim || '||'''||rec.column_name||'''';
        else
            l_c := 1;
            l_ret := l_ret || '''' || rec.column_name || '''';
        end if;
      end loop;
        l_ret := l_ret || ' from dual';
      dbms_output.put_line(l_ret);
    end;-------
    EDIT: just a comment on the complexity of this export, each record in the back-end table adds 12 columns to my export table. Those 12 columns are coming from 5 different tables and are the product of a set of functions calculating or looking up their values. This is export is really a pivot table based on the records in another table.
    Edited by: nimda xinu on Mar 8, 2013 1:28 PM

    Thank you, Denes, for looking into my issue. I appreciate your time!
    It is unfortunately a business requirement. My customer has required that the data we are migrating to this app from a spreadsheet be exported in the same format, albeit temporarily. I still must meet the requirement. I'm working around the 350 columns by dumping everything into a single column, which is working for the data, however, the headers export is throwing the 01489 error. I did run into the error you posted in your reply. I attempted to work around it with the clob type but eneded up running into my string concatentation error again.
    I'm open to any suggestions at this point given that I have the data. I'm so close because the data is exporting, but because the columns are dynamic, the export does me little good without the headers to go along with it.

  • Include Button that executes PL/SQL procedure to SQL query based region

    I would like to add two columns to a SQL query region.
    These columns would not be sourced from the query, but rather would be used to execute a PL/SQL procedure.
    For example, I would like to have a manager approve or deny adding an additional employee to the department.
    There would be one button for APPROVE. And, one button for DENY.
    The PL/SQL procedure would execute to perform the required DML based upon the selected action (either APPROVE or DENY).
    A sample output would look like this:
    <APPROVE>, <DENY>, John Doe, Accountant
    <APPROVE>, <DENY>, Jane Doe, Accountant
    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?
    Thanks!
    -Reid

    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?Conditional page item? You can associate processes with buttons on a page

Maybe you are looking for