Apexir_REPORT_ID

Hello,
I've an urgent question concerning interactive reports:
How can I get and use the apexir_REPORT_ID in a dynamic action with "Action-type" = "Execute PL/SQL-Code"?
If I choose "Action type" = "Execute JavaScript Code" I can get the apexir_REPORT_ID with the code: $s('P20_TEXTAREA_1',$v('apexir_REPORT_ID'));
Thanks in advance.
I use APEX 4.0

Thanks,
Your explanations are great and the example works.
But I need help with one more step.
What I was originally trying to do was pass the returned value to a called procedure.
I tried populating a Page item P2_BASE_REPORT_ID by placing in the HTML Form Element Attribute:
onload="getCurIRRptID"
per the Oracle® Application Express Application Builder User’s Guide Release 3.1.2.
but the javascript did not execute.
Per your instruction I placed this in the Region Footer of the Interactive Report:
<script type="text/javascript">
getCurIRRptID();
</script>
and the alerts return the expected results.
But I want to pass this returned value to a called procedure.
So my question now is
'How do I get that returned value into a item I can pass to the procedure?'
My Page process below.
declare
rc1 number(3) :=0;
begin
BUILD_REPROCESS_STAT_FILE(:P2_PAGE_ID,:P2_SESSION_ID,:P2_BASE_REPORT_ID,:P2_USER_ID,RC1,:P2_RTN_MSG);
:P2_RETURN_CODE := TO_CHAR(rc1,'999');
end;
Thanks for all your help.
Dan

Similar Messages

  • Question about $v('apexir_REPORT_ID')

    oracle 11.2.0.1-64bit
    apex 3.2
    I have been following the instructions around how to get the filter data for an IR report as documented at
    http://stewstools.wordpress.com/2009/02/19/get-ir-where-clause/
    The header has the following function to popup a new window containing my report
    function SaveAndRunReport() {
    popUp2('f?p=&APP_ID.:7:&SESSION.:new_request:NO::'+
    'P7_IR_REPORT_ID:'+$v('apexir_report_id'), 1024, 768);
    The value from $v('apexir_report_id') being passed is always 1211412456457927. And it's this value no matter how many times I run this from different machines and sessions and browsers.
    The piece of code that builds the WHERE clause that contains the filter data gets its data from apex_application_page_ir_cond table.
    SELECT application_id, page_id, report_id, condition_column_name
    FROM apex_application_page_ir_cond;
    I opened up 3 sessions and ran the IR with different filters in each. This query gives me
    application_id, page_id, report_id, condition_column_name
    102     1     1230320709225743     EMP_ID
    102     1     1225208589522031     DEPT_ID
    102     1     1231517487560556     NAME
    The report id's being logged in the table are different, as expected. But the value from $v('apexir_report_id') being passed is 1211412456457927.
    And I can't get the query to work when I can't get the right report Id passed.
    anyone have any ideas on what I could be doing wrong?
    Thanks

    ZKay wrote:
    Hi All,
    Database: 11g
    Apex 4.0.1
    I have an updatable interactive report with the following region source:
    SELECT empno, APEX_ITEM.HIDDEN(20, empno) as emp_id, ename, sal, APEX_ITEM.SELECT_LIST_FROM_LOV(21, NULL, 'EMP_REVIEW_LOV', 'class="lov_select"', 'NO', NULL, NULL, NULL, NULL, 'NO') as emp_review FROM emp
    Whenever a value is selected from the LOV, a dynamic action runs and updates another table. This is working fine but I also need to know the empno value to use in the dynamic action. Is it possible to pick up the empno value of the row in this scenario?
    Thanks
    ZKay
    I prefer using Jari blogs for editable interactive report. Its based on Collection and you will have more control over the data.
    Let me google that for you
    Br,
    Zaif

  • Javascript & 'apexir_REPORT_ID'

    I am trying to use the document.getElementById('apexir_REPORT_ID') or $v('apexir_REPORT_ID').
    BUT I am below a JavaScript 'Novice'.
    I have no JavaScript Resources to call on here.
    Can you help this frustrated mainframer in this foreign land?
    I created a Page 2.
    In the HTML Header I entered:
    <script language="JavaScript1.1"; type="text/javascript">
    function getCurIRTab()
    alert("Entered getCurIRTab Function");
    var temp_base_report_id = document.getElementById('apexir_REPORT_ID');
    // var temp_base_report_id = $v('apexir_REPORT_ID');
    alert("Report ID => " || '*'+temp_base_report_id+'*' );
    return temp_base_report_id;
    getCurIRTab();
    </script>
    I created a IR Region
    I created a Page Item P2_FLOW_ID which I successfully populated with the substitution string 'APP_ID'.
    I created a Page Item P2_PAGE_ID which I successfully populated with the substitution string 'APP_PAGE_ID'.
    I created a Page Item P2_SESSION_ID which I successfully populated with the substitution string 'APP_SESSION'.
    I created a Page Item P2_BASE_REPORT_ID which I am trying to populate.
    In the HTML Form Element Attributes I entered: onsubmit="getCurIRTab()"
    On the IR report I have the:
    'Working Report' (default) report with multiple conditions
    'Saved Report 1' report with multiple conditions
    'Saved Report 2' report with multiple conditions
    I a currently viewing 'Report 1'.
    - I see my alerts
    - Via FireBug I do not recieve any error codes on the JavaScript,
    - But I also do not get anything populating the temp_base_report_id text field
    What am I doing wrong?
    Dan

    Thanks,
    Your explanations are great and the example works.
    But I need help with one more step.
    What I was originally trying to do was pass the returned value to a called procedure.
    I tried populating a Page item P2_BASE_REPORT_ID by placing in the HTML Form Element Attribute:
    onload="getCurIRRptID"
    per the Oracle® Application Express Application Builder User’s Guide Release 3.1.2.
    but the javascript did not execute.
    Per your instruction I placed this in the Region Footer of the Interactive Report:
    <script type="text/javascript">
    getCurIRRptID();
    </script>
    and the alerts return the expected results.
    But I want to pass this returned value to a called procedure.
    So my question now is
    'How do I get that returned value into a item I can pass to the procedure?'
    My Page process below.
    declare
    rc1 number(3) :=0;
    begin
    BUILD_REPROCESS_STAT_FILE(:P2_PAGE_ID,:P2_SESSION_ID,:P2_BASE_REPORT_ID,:P2_USER_ID,RC1,:P2_RTN_MSG);
    :P2_RETURN_CODE := TO_CHAR(rc1,'999');
    end;
    Thanks for all your help.
    Dan

  • Interactive report URL syntax

    Hi
    I'm using Apex 3.1.2, and am fairly new to using Interactive reports. I've found the URL syntax to apply a filter on an IR, and was just wondering if it is possible to apply a sort, or even open a saved report from a URL link? I am well aware that I can work around it (using different pages with a sort pre-applied etc) but was hoping that I could do everything on one page.
    Thanks!
    -Marc

    Hi Marc,
    I just read over the document and it doesn't appear that we can do it via the URL, however you may be able to do this using JS.
    Try this (I did this as a test on the emp table)
    //Send filter request
    var get = new htmldb_Get(null,$v('pFlowId'),'APXWGT',$v('pFlowStepId'));
    get.addParam('f01','EMPNO');
    get.addParam('f01','=');
    get.addParam('f01','7369');
    get.addParam('f01','');
    get.addParam('f01','minutes');
    get.addParam('p_widget_action','FILTER');
    get.addParam('p_widget_action_mod','ADD');
    get.addParam('p_widget_mod','ACTION');
    get.addParam('p_widget_name','worksheet');
    get.addParam('x01',$v('apexir_WORKSHEET_ID'));
    get.addParam('x02',$v('apexir_REPORT_ID'));
    get.addParam('x03','EMPNO');
    var gReturn = get.get();
    //Refresh report request
    var get = new htmldb_Get(null,$v('pFlowId'),'APXWGT',$v('pFlowStepId'));
    get.addParam('p_widget_mod','PULL');
    get.addParam('p_widget_name','worksheet');
    get.addParam('x01',$v('apexir_WORKSHEET_ID'));
    get.addParam('x02',$v('apexir_REPORT_ID'));
    get.addParam('x03','EMPNO');
    var gReturn = get.get();
    //Refresh HTML report
    $s('apexir_WORKSHEET',gReturn);
    I'll try to put a post on my blog about the full solution to this shortly ([http://apex-smb.blogspot.com/])
    Martin

  • Interactive Reports in Firefox 3.0.5

    Hi!
    When running an interactive report in Firefox 3.0.5, the pull-down menu next to the cog icon does not display right over the icon as it does in IE. Rather, the menu displays at the bottom of the page below the report area.
    Anyone knows why is this and how it can be fixed?
    Thx!
    Marc

    ...and FWIW, here's the whole page code...
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>W-9 File Upload &amp; Search</title>
    <link rel="stylesheet" href="/apex_images/themes/theme_15/theme_V3.css" type="text/css" />
    <style type="text/css">
    <!--
    body {
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 12px;
         margin: 0px;
         padding: 0px;
         line-height: 16px;
         width: 100%;
    #header {
         overflow: hidden;
         border-bottom-width: 2px;
         border-bottom-style: solid;
         border-bottom-color: #0099CC;
    #wrap {
         overflow: hidden;
         margin: 0px;
    #primary {
         float: left;
         width: 100%;
         border-top-width: 10px;
         border-top-style: solid;
         border-top-color: #D7EDFE;
         margin: 0px;
         padding: 0px;
    #secondary {
         width: 25%;
         float: left;
         border-top-width: 10px;
         border-top-style: solid;
         border-top-color: #D7EDFE;
         display: none;
    #footer {
         clear: both;
    #header #column-1 {
         float: left;
         width: 25%;
    #header #column-2 {
         float: left;
         width: 50%;
    #header #column-3 {
         float: right;
         width: 25%;
         text-align: right;
    table.standardLook tr:hover {
         background-color: #DDE9FE;
    #tabs {
    clear:both;
    width:100%;
    #tabs ul {
         float:right;
         list-style-type:none;
         margin:0px;
         padding:0px;
    #tabs ul li {
         float: left;
         margin-right:0px;
         background-image: url(https://dev-navcentral.navigators.org/apex_images/themes/theme_15/tab_open.gif);
         background-repeat: no-repeat;
    #tabs ul li.current {
        background-image: url(https://dev-navcentral.navigators.org/apex_images/themes/theme_15/tab_open_c.gif);
    #tabs ul li a {
         float:left;
         padding-left:0px;
         padding-right:9px;
         font:12px Arial;
         text-decoration:none;
         font-weight:bold;
         color:#336699;
         line-height:19px;
         height: 19px;
         margin-left: 10px;
         background-image: url(/apex_images/themes/theme_15/tab_center.gif);
    #tabs ul li.current a {
         background-image: url(/apex_images/themes/theme_15/tab_center_c.gif);
         margin-left: 12px;
         color: #CEDFF0;
    #tabs ul li a:hover {
         color: #003366;
    #tabs ul li.current a:hover {
         color: #ffffff;
    -->
    </style>
    <script src="/apex_images/javascript/apex_ns_3_1.js" type="text/javascript"></script>
    <script src="/apex_images/javascript/apex_3_1.js" type="text/javascript"></script>
    <script src="/apex_images/javascript/apex_get_3_1.js" type="text/javascript"></script>
    <script src="/apex_images/javascript/apex_builder.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    /*Global JS Variables*/
    var htmldb_Img_Dir = "/apex_images/";
    //-->
    </script>
    <link rel="stylesheet" href="/apex_images/css/apex_3_1.css" type="text/css" />
    <!--[if IE]><link rel="stylesheet" href="/apex_images/css/apex_ie_3_1.css" type="text/css" /><![endif]-->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    <body >
    <div id="wrap">
      <form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm" >
      <input type="hidden" name="p_flow_id" value="275" id="pFlowId" />  <input type="hidden" name="p_flow_step_id" value="1" id="pFlowStepId" />  <input type="hidden" name="p_instance" value="1054298689687563" id="pInstance" />  <input type="hidden" name="p_page_submission_id" value="4137293142420641" id="pPageSubmissionId" />  <input type="hidden" name="p_request" value="" id="pRequest" />    <div id="header">
        <div id="column-1">
          <br />
        </div>
        <div id="column-2">
        </div>
        <div id="column-3">
          <br />
        </div>
        <div id="tabs">
          <ul>
            <li class="current"><a href="javascript:doSubmit('T_PAGE_1');">W-9 File Upload</a></li><li><a href="javascript:doSubmit('T_UPLOAD EXCEPTIONS');">Upload Exceptions</a></li><li><a href="javascript:doSubmit('T_USERS');">Users</a></li>
          </ul> 
        </div>
        <div style="clear:both;"></div>
      </div>
      <div id="primary">
        <div id="primary-header">
          <div id="R1102609521283413" class="t15breadcrumb"><ul></ul></div>
        </div>
        <div id="notification">
        </div>
        <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td align="right"><table class="t15Button" cellspacing="0" cellpadding="0" border="0"  summary=""><tr>
    <td class="t15L"><img src="/apex_images/themes/theme_15/button-l.gif" alt="" /></td>
    <td class="t15C"><a href="javascript:doSubmit('UPLOAD_FILES')">Upload Files</a></td>
    <td class="t15R"><img src="/apex_images/themes/theme_15/button-r.gif" alt="" /></td>
    </tr></table></td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0" id="R1118932641117463" class="t15ReportsRegion" summary="">
    <tr>
    <td valign="bottom" class="t15RegionHeader">W-9 Uploaded Files</td>
    <td align="right" class="t15ButtonHolder">   </td></tr>
    <tr>
    <td colspan="2" valign="top" class="t15Body"><div id="apexir_WORKSHEET_REGION" class="apex_worksheet"><div id="apexir_DETAIL" class="apex_detail"></div><div id="apexir_REPORT" class="apex_report"><div id="apexir_TOOLBAR" class="apex_toolbar"><table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><table class="apex_finderbar" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td valign="top" class="apex_finderbar_left_top"><img src="/apex_images/1px_trans.gif" class="spacer" width="10" height="8" alt="" /></td><td rowspan="3" class="apex_finderbar_middle" valign="middle"><img src="/apex_images/htmldb/builder/finder_w_dropdown.gif" id="apexir_SEARCH_ICON" onclick="gReport.controls.search_column();" /><input type="hidden" id="apexir_CURRENT_SEARCH_COLUMN" /><div id="apexir_SEARCHDROP" style="display:none;"><br /></div></td><td rowspan="3" class="apex_finderbar_middle" valign="middle" id="apexir_SEARCH_COLUMN_DROP" ></td><td rowspan="3" class="apex_finderbar_left" valign="middle"><table class="formlayout" summary=""><tr><td nowrap="nowrap" align="right"></td><td  colspan="1" rowspan="1" align="left"><input type="text" size="30" maxlength="2000" value="" id="apexir_SEARCH" onkeyup="($f_Enter(event))?gReport.search('SEARCH'):null;" /></td><td nowrap="nowrap" align="right"> <label for="apexir_NUM_ROWS">Rows</label></td><td  colspan="1" rowspan="1" align="left"><select size="1"  id="apexir_NUM_ROWS"  name="p_accept_processing"><option  value="1">1</option><option  value="5">5</option><option  value="10">10</option><option selected="selected" value="15">15</option><option  value="20">20</option><option  value="25">25</option><option  value="30">30</option><option  value="50">50</option><option  value="100">100</option><option  value="200">200</option><option  value="500">500</option><option  value="1000">1000</option><option  value="5000">5000</option><option  value="100000">All</option></select></td><td nowrap="nowrap" align="right"></td><td  colspan="1" rowspan="1" align="left"><input type="button" value="Go"  onclick="gReport.search('SEARCH')"  /></td><td align="left" width="55"><div class="dhtmlMenuLG"><div class="dhtmlMenuItem" style="margin-right:0px;"><img src="/apex_images/ws/action_dropdown.gif"  class="dhtmlMenu" onclick="gReport.controls.menu(this,'apexir_ACTIONSMENU',false)" alt=""/></div><ul id="apexir_ACTIONSMENU" htmldb:listlevel="2" class="dhtmlSubMenu" style="display:none;"><li><a href="javascript:gReport.controls.display_column('COLUMN');" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Select Columns"><img src="/apex_images/ws/edit_col_32.gif" /> Select Columns</a></li>
    <li class="dhtmlMenuSep"><img src="/apex_images/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>
    <li><a href="javascript:gReport.controls.filter();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Filter"><img src="/apex_images/ws/filter_32.gif" /> Filter</a></li>
    <li><a href="javascript:gReport.controls.ordering();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Sort"><img src="/apex_images/ws/sort_32.gif" /> Sort</a></li>
    <li><a href="javascript:gReport.controls.ctrl_break();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Control Break"><img src="/apex_images/ws/break_col_32x24.gif" /> Control Break</a></li>
    <li><a href="javascript:gReport.controls.highlight();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Highlight"><img src="/apex_images/ws/highlight_32x24.gif" /> Highlight</a></li>
    <li class="dhtmlMenuSep"><img src="/apex_images/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>
    <li><a href="javascript:gReport.controls.flashback();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Flashback"><img src="/apex_images/ws/flashback_32x24.gif" /> Flashback</a></li>
    <li class="dhtmlMenuSep"><img src="/apex_images/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>
    <li><a href="javascript:gReport.controls.save();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Save Report"><img src="/apex_images/ws/disk_32.gif" /> Save Report</a></li>
    <li><a href="javascript:gReport.controls.reset();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Reset"><img src="/apex_images/ws/reset_32x24.gif" /> Reset</a></li>
    <li class="dhtmlMenuSep"><img src="/apex_images/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>
    <li><a href="javascript:popupURL('wwv_flow_utilities.show_ir_help?p_app_id=275&p_worksheet_id=1119004877117463&p_lang=en-us');" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Help"><img src="/apex_images/ws/help_32x24.gif" /> Help</a></li>
    <li class="dhtmlMenuSep"><img src="/apex_images/1px_trans.gif"  width="1" height="1" alt=""  class="dhtmlMenuSep" /></li>
    <li><a href="javascript:gReport.controls.download();" class="dhtmlSubMenuN" onmouseover="dhtml_CloseAllSubMenusL(this)" title="Download"><img src="/apex_images/ws/download_32x24.gif" /> Download</a></li>
    </ul></div></td></tr><tr><td></td><td  colspan="1" rowspan="1" align="left"></td></tr></table></td><td rowspan="3" width="30"><br /></td></tr><tr><td class="apex_finderbar_left_middle"><br /></td></tr><tr><td valign="bottom" class="apex_finderbar_left_bottom"><img src="/apex_images/1px_trans.gif" class="spacer" width="10" height="8"  alt="" /></td></tr></tbody></table></td></tr></table></div><div id="apexir_WORKSHEET"><div id="apexir_CONTROL_PANEL_DROP" class="drop_panel clearfix" style="display:none"></div><style id="apexir_WORKSHEET_CSS" type="text/css">
    </style>
    <input type="hidden" id="apexir_WORKSHEET_ID" value="1119004877117463" />
    <input type="hidden" id="apexir_APP_USER" value="23733090" />
    <input type="hidden" id="apexir_REPORT_ID" value="1119819810130548" />
    <div>
    <div id="apexir_CHART">
    </div>
    <div id="apexir_CALENDAR">
    </div>
    <div id="apexir_DATA_PANEL">
    <table summary="">
    <tr><td colspan="5" class="pagination" align="right"><span class="fielddata"> 1 - 15 of 1559 <a href="javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')"><img src="/apex_images/jtfunexe.gif" title="Next" alt="Next" align="absmiddle" /></a></span></td></tr>
    <tr><td><script>var gTable = '1119004877117463'</script>
    <table summary="" cellpadding="0" cellspacing="0" border="0" class="apexir_WORKSHEET_DATA" id="1119004877117463">
    <tr><th><div id="apexir_DOWNLOAD" onclick="gReport.controls.widget(this.id)" style="text-align:center;">Download</div></th><th><div id="apexir_FILENAME" onclick="gReport.controls.widget(this.id)" style="text-align:center;">Filename</div></th><th><div id="apexir_DATE_UPLOADED" onclick="gReport.controls.widget(this.id)" style="text-align:center;">Date Uploaded</div></th><th><div id="apexir_ELIMINATE" onclick="gReport.controls.widget(this.id)" style="text-align:center;">Delete</div></th></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23759474_12032008_Conservative_Baptist_Foreign_Mission.pdf%2C1&cs=3BE46CEC54B25D9045EA1101E5205F6C5" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23759474_12032008_Conservative_Baptist_Foreign_Mission.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23759474_12032008_Conservative_Baptist_Foreign_Mission.pdf%2C1&cs=35E7631A02949AC0874933DB5011A7A9B" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23759484_12032008_Elaina_Whittenhall.pdf%2C1&cs=30628489CF133D8AE07C3F6DCDEACD4B5" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23759484_12032008_Elaina_Whittenhall.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23759484_12032008_Elaina_Whittenhall.pdf%2C1&cs=324BE78644A60856A9FB7598AE0E2927D" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23759494_12032008_Donald_Parrott.pdf%2C1&cs=381C0B68B62C1DE0AFAFFB138849DD343" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23759494_12032008_Donald_Parrott.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23759494_12032008_Donald_Parrott.pdf%2C1&cs=3E7711587AEB6567E2E5DB49A4486F146" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23759505_12032008_Hydron_Turf_Inc.pdf%2C1&cs=370546244E33C0CDD45EC592543251891" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23759505_12032008_Hydron_Turf_Inc.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23759505_12032008_Hydron_Turf_Inc.pdf%2C1&cs=368EB6EC80669A372E442EEE7009E7614" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23759511_12032008_Zeeks_Pizza_inc.pdf%2C1&cs=393AD5D099610F1714B0EA78181EE755C" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23759511_12032008_Zeeks_Pizza_inc.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23759511_12032008_Zeeks_Pizza_inc.pdf%2C1&cs=34281BB3410289F25BA111051C2470AF1" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:1437_12032008_Foxworth_Galbraith.pdf%2C1&cs=310BF9AC14F29E35E6027C2EC6B7D49C4" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">1437_12032008_Foxworth_Galbraith.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:1437_12032008_Foxworth_Galbraith.pdf%2C1&cs=31A37B74BF39A7A8028457C978A3982E1" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:1442_12032008_Brunos_Party_Time_Rental.pdf%2C1&cs=359B1791458976AF272259756BECC2426" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">1442_12032008_Brunos_Party_Time_Rental.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:1442_12032008_Brunos_Party_Time_Rental.pdf%2C1&cs=362713E518E1A23FE165DCC5C909B529B" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23747564_12032008_Matt_Mikalatos.pdf%2C1&cs=3852CC3C23951C12384568DD801BEB0DD" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23747564_12032008_Matt_Mikalatos.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23747564_12032008_Matt_Mikalatos.pdf%2C1&cs=301CD3F8543CB50E0AC89D0AD605CB915" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23747574_12032008_Casas_Por_Cristo.pdf%2C1&cs=3892F3DE74C4E007443D5117634A7D329" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23747574_12032008_Casas_Por_Cristo.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23747574_12032008_Casas_Por_Cristo.pdf%2C1&cs=3E14BCB602BA6BEAC7369238C19669216" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23747868_12032008_Mark_Brunson.pdf%2C1&cs=326579694381D52F1C9B0E6CEFF9B6AC0" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23747868_12032008_Mark_Brunson.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23747868_12032008_Mark_Brunson.pdf%2C1&cs=3D7A290F9474B4674EB57810CDEE828C7" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23747892_12032008_Brandon_Tackett.pdf%2C1&cs=35159001B486DD368DDB15977B0D0CC74" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23747892_12032008_Brandon_Tackett.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23747892_12032008_Brandon_Tackett.pdf%2C1&cs=3D672DF7CAF3DEB99CF9D36788CEFF94A" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23747990_12032008_Jami_Kirkbride.pdf%2C1&cs=3500DCCE200085E8071279B7431382DD5" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23747990_12032008_Jami_Kirkbride.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23747990_12032008_Jami_Kirkbride.pdf%2C1&cs=38AB133AF835915640EBCE78E346925F3" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23748001_12032008_Steven_Todd.pdf%2C1&cs=3C92E47F21A6264800ED11EDD1909A23F" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23748001_12032008_Steven_Todd.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23748001_12032008_Steven_Todd.pdf%2C1&cs=37031494E7B6950E1DFEBCE014A7E8DD8" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23748023_12032008_Amerigas.pdf%2C1&cs=38C1BA2D898623C6EB90373DC0B42694A" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23748023_12032008_Amerigas.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23748023_12032008_Amerigas.pdf%2C1&cs=3565731C7716F663E9B115B003135A29B" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    <tr ><td  align="center"><a href="f?p=275:2:1054298689687563::NO::P2_DOC_NAME,P2_REQUESTING_PAGE:23761639_12172008_Kathy_Ammon.pdf%2C1&cs=3E678E6956231231F39E6CF9181B6E3D4" ><img src="/apex_images/download.gif" alt="Download" width="20" height="20"></a></td><td  align="left">23761639_12172008_Kathy_Ammon.pdf</td><td  align="left">20-JAN-2009 11:16AM</td><td  align="center"><a href="f?p=275:4:1054298689687563:ELIM:NO::P4_DOC_NAME,P4_RETURNING_PAGE:23761639_12172008_Kathy_Ammon.pdf%2C1&cs=32787E0AB470723DDB5D7159696FD1596" ><img src="/apex_images/del.gif" alt="Delete"></a></td></tr>
    </table></td></tr>
    <tr class="fielddatasmall" align="left"><td>
    </td></tr>
    <tr><td colspan="5" class="pagination" align="right"><span class="fielddata"> 1 - 15 of 1559 <a href="javascript:gReport.navigate.paginate('pgR_min_row=16max_rows=15rows_fetched=15')"><img src="/apex_images/jtfunexe.gif" title="Next" alt="Next" align="absmiddle" /></a></span></td></tr>
    </td></tr>
    </table>
    </div>
    </div>
    </div>
    </div></div><script type="text/javascript">
    addLoadEvent(init_gReport);
    var gReport,gValid;
    function init_gReport(){
    gReport = new apex.worksheet.ws('');
    gValid = new apex.validation.v();
    </script>
    <div id="apexir_rollover" style="position:absolute;display:none;"><table cellpadding="1" cellspacing="0" border="0" width="100%"><tr><td><span id="apexir_sortup"><img src="/apex_images/ws/dup.gif" alt="Sort Ascending" title="Sort Ascending" onclick="gReport.column.order('ASC')" /></span><span id="apexir_sortdown"><img src="/apex_images/ws/ddown.gif" alt="Sort Descending" title="Sort Descending" onclick="gReport.column.order('DESC')" /></span><span id="apexir_hide"><img src="/apex_images/ws/trash.gif" alt="Hide Column" title="Hide Column" onclick="gReport.column.hide()" /></span><span id="apexir_break"><img src="/apex_images/ws/break_col.gif" alt="Control Break" title="Control Break" onclick="gReport.column.break_on()" /></span><span id="apexir_info"><img src="/apex_images/ws/info_20x18.gif" alt="Column Information" title="Column Information" onclick="gReport.controls.info()" /></span><span id="apexir_computation"><img src="/apex_images/ws/calc.gif" alt="Compute" title="Compute" onclick="gReport.controls.computation(false)" /></span></td></tr><tr><td><input type="text" onkeyup="$d_Find('apexir_rollover_content',this.value,'a');" style="width:95%;" id="apexir_search" /></td></tr></table><div id="apexir_rollover_content"></div></div><span id="apexir_LOADER" style="display:none;"><img src="/apex_images/ws/ajax-loader.gif" /></span></td>
    </tr>
    </table><table id="apex_layout_3134323851085756" class="formlayout" summary="" ><tr><td></td><td  colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="3134621904094597" /><input type="hidden" name="p_t01" value="test-navcentral.navigators.org" id="P1_SERVER_NAME"  /></td></tr><tr><td></td><td  colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="3139106994289054" /><input type="hidden" name="p_t02" value="" id="P1_DEBUG"  /></td></tr>
    </table>
      </div>
      <div id="secondary">
      </div>
      <div id="footer">
        <br />
      </div>
      <input type="hidden" name="p_md5_checksum" value=""  /></form>
    </div>
    <script type="text/javascript">
    <!--
    //-->
    </script></body>
    </html>Marc

  • Saving checkbox-state to table in Interactive Report

    Hi,
    I have been working with the information on http://www.apexninjas.com/blog/wp-content/uploads/2012/03/Checkboxes_in_Interactive_Reports.pdf to create an interactive report with a column containing a checkbox for each row.
    My report contains the following (simplified):
    Task_id, Employee_id, Checkbox_column
    The checkbox_column keeps track of which employees work on which tasks, so it could be:
    Task_id, Employee_id, Checkbox_column
    1               1                         0
    1               2                         1
    1               3                         0
    signifying that only employee 2 works on task 1.
    Now, I need to be able to change the 0 to 1 by clicking the checkbox, which already is possible, but I have problems saving that row to the database. Saving the checkbox state is also included in the PDF I used (page 12-14, 'Saving the checkbox state #2'), but I don't really understand where to put the scripts, I haven't worked with scripts and processes before so I could use some help understanding which script I need to put where. All in all, it's not too much code, I just don't understand where to put it.
    The scripts mentioned in the PDF are:
    The first one is a SQL-statement or a package, I imported the package in my environment, so I won't put the SQL here
    This is the only one I know where to put:
    <script type="text/javascript">
    function getCurIRTab()
    var temp_base_report_id = $v('apexir_report_id');
    return temp_base_report_id;
    </script>
    This I don't know where to put:
    <script type="text/javascript">
    document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
    </script>
    the PDF says:
    Now, create a hidden (just hidden, not protected!) item called P_IR_REPORT_ ID inside a HTML region.
    Important! This region has to be rendered afterthe Interactive Report, so create it in the “after footer” display point!
    In this regions’s footer paste the following JavaScript code, that will assign the hidden item P_IR_REPORT_ID the value of the Interactive Report ID.
    But can we create a region in the after footer?
    This I don't know where to put because the document doesn't specify it:
    apex_ir_query.ir_query_where
    (:APP_ID,--application id
    99,--page id
    :SESSION,--sesion ID
    : P_IR_REPORT_ID -–interactive report ID);
    This I don't know where to put, but I guess it's a 'processing' process:
    declare
    whereStmt varchar2(2000);
    sqlStmt varchar2(2000);
    begin
    whereStmt := apex_ir_query.ir_query_where(:APP_ID,
    99,
    :SESSION,
    :P_IR_REPORT_ID);
    sqlStmt := 'update CHK_TEST set SELECTED = 0 where SELECTED= 1'||whereStmt;
    execute immediate sqlStmt;
    if APEX_APPLICATION.G_F01.COUNT>0 then
    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    update CHK_TEST
    set VALID_LINE = 1
    where SELECTED_ID = APEX_APPLICATION.G_F01(i)
    and VALID_LINE = 0;
    END LOOP;
    end if;
    end;
    Can I please get some help understanding where exactly to put these scripts?
    I've been looking around on the forum and Google but I can't find the detailed answer to what I'm looking for anywhere.
    I am currently working with the test environment Oracle supplied us, because we are testing if we can use APEX at our company.
    The version is Application Express 4.2.2.00.11 and it's running on Oracle 11g.
    Just ask if you need any more info.
    Thanks for the answers!
    NDG

    Please put together an example application on apex.oracle.com and provide developer credentials.  This would help prevent multiple posts back and forth about try this, try that, now try this, now try that......
    But until you do that try this:
    I think you already know that the following goes in the page html header.
    <script type="text/javascript">
    function getCurIRTab()
    var temp_base_report_id = $v('apexir_report_id');
    return temp_base_report_id;
    </script>
    Alternately, since you are on apex 4.2 you could just add it to the Page Attributes->JavaScript->Function and Global Variable Declaration field (without the script tags):
    function getCurIRTab()
    var temp_base_report_id = $v('apexir_report_id');
    return temp_base_report_id;
    Now you need to create an HTML region (in display point "after footer").  Then you create the P_IR_REPORT_ID hidden item inside your new region.
    In the region definition you will put the following code into the region footer:
    <script type="text/javascript">
    document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
    </script>
    Alternately, you could try to add the line to the Page Attributes->JavaScript->Execute when Page Loads field:
    document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
    This is just an example of the procedure call you will make in your page process.
    apex_ir_query.ir_query_where
    (:APP_ID,--application id
    99,--page id
    :SESSION,--sesion ID
    : P_IR_REPORT_ID -–interactive report ID);
    It is included in this code which you will put into a page process.
    declare
    whereStmt varchar2(2000);
    sqlStmt varchar2(2000);
    begin
    whereStmt := apex_ir_query.ir_query_where(:APP_ID,
    99,
    :SESSION,
    :P_IR_REPORT_ID);
    sqlStmt := 'update CHK_TEST set SELECTED = 0 where SELECTED= 1'||whereStmt;
    execute immediate sqlStmt;
    if APEX_APPLICATION.G_F01.COUNT>0 then
    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    update CHK_TEST
    set VALID_LINE = 1
    where SELECTED_ID = APEX_APPLICATION.G_F01(i)
    and VALID_LINE = 0;
    END LOOP;
    end if;
    end;
    Ok, clear as mud!

  • Get Report_Id of Interactive Report

    I am atempting to get the report id of the currently selected report in a specific page.
    The problem is that here are several diferent views (SAVED REPORT) and i don't how how to get the currently selected in the session.
    How can I do that?
    Thanks
    Pedro

    The report is selected using the interactive report tabs from the previous saved reports.
    I have been trying this:
    Javascript & 'apexir_REPORT_ID'
    but it fails because the value is always the same, the based_report_id of the Working directory, not the selected tab (interactive report save).
    Any thougths??

  • Javascript Autocomplete by Tom Petrus and VC

    Hi
    I am using the following on my interactive report to provide a google search like autocomplete as the user enters a name, surname, date etc
    This works find apart from when searching for a surname such as 'Rees' it does not bring this back but will bring back suggestions like 'Crees'. 'Freestone' etc
    Same for forename when searching for 'Ian' it does not bring this back 'Ian' but brings back 'Adrian', 'Brian' etc
    This only happens on certain names however searching for 'Paul', 'Steven' 'Brian' works fine
    If anyone could shed any light into what's causing this it would be most helpful
    function srch2(pItem, pColumn) {  
       $.post('wwv_flow.show',
              {"p_request"          : 'APXWGT',
              "p_widget_action"     : 'FILTER',
              "p_widget_action_mod" : 'ADD',
              "p_widget_mod"        : 'ACTION',
              "p_widget_name"       : 'worksheet',
              "p_flow_id"           : $v('pFlowId'),
              "p_flow_step_id"      : $v('pFlowStepId'),
              "p_instance"          : $v('pInstance'),
              "x01"                 : $v('apexir_WORKSHEET_ID'),
              "x02"                 : $v('apexir_REPORT_ID'),
              "x03"                 : pColumn,
              "f01"                 : ['COLUMN', pColumn, '=', $v(pItem), null, 'minutes']
             function(data){
                //when the filter has been successfully applied the report has to be refreshed
                if(data=="true"){
                   gReport.pull();
       //clear the item
       $s(pItem,'');
    $(document).ready(function(){
       //hide IR toolbar
       $('#apexir_TOOLBAR').hide();
       $('#P4_AC').bind("result", function(){   
          //on selecting a value then fire the search function
          srch2(this, 'INDSNAME');
       // ac item P4_AC2
       $('#P4_AC2').bind("result", function(){   
          srch2(this, 'INDFNAME');
       // ac item YEARD
       $('#YEARD').bind("result", function(){
          srch2(this, 'NEWYEAR');
    // ac item REG
       $('#REG').bind("result", function(){
          srch2(this, 'INDREG');
    // ac item ENTNO
       $('#ENTNO').bind("result", function(){
          srch2(this, 'INDENT');

    Hi Tom
    Could it be that on the interactive report it mentions "This query returns more than 100,000 rows, please filter your data to ensure complete results."
    There is no plugin its just using the two pieces of code I mentioned in the threads above
    This is the original thread
    https://forums.oracle.com/thread/2412281

  • Autocomplete search appearing but search not firing?

    I am using the following in my interactive report to provide an autocomplete Jquery search fields
    When typing in an item in the search boxes the autocomplete works find but for some reason it is not firing the search anymore? Any ideas on what I am missing with this? I have spent the week on it and it would be great to sign off the week with a working report!
    Many Thanks
    In the Javascript section of the page I am using
    function srch2(pItem, pColumn) {  
    $.post('wwv_flow.show',
    {"p_request" : 'APXWGT',
    "p_widget_action" : 'FILTER',
    "p_widget_action_mod" : 'ADD',
    "p_widget_mod" : 'ACTION',
    "p_widget_name" : 'worksheet',
    "p_flow_id" : $v('pFlowId'),
    "p_flow_step_id" : $v('pFlowStepId'),
    "p_instance" : $v('pInstance'),
    "x01" : $v('apexir_WORKSHEET_ID'),
    "x02" : $v('apexir_REPORT_ID'),
    "x03" : pColumn,
    "f01" : ['COLUMN', pColumn, '=', $v(pItem), null, 'minutes']
    function(data){
    //when the filter has been successfully applied the report has to be refreshed
    if(data=="true"){
    gReport.pull();
    //clear the item
    $s(pItem,'');
    $('#P4_AC').bind("result", function(){   
    //on selecting a value then fire the search function
    srch2(this, 'INDSNAME');
    // ac item P4_AC2
    $('#P4_AC2').bind("result", function(){   
    srch2(this, 'INDFNAME');
    // ac item YEARD
    $('#YEARD').bind("result", function(){
    srch2(this, 'NEWYEAR');
    });

    Nico Martens wrote:
    Console the most left tab of firebug. It shows all dynamic actions that are firedyes, exactly. Open up firebug and watch the console. Ideally, when selecting a value from the autocomplete 2 ajax calls should appear. The first one is the one to apply filters, the second on if the refresh (report pull). You can easily identify them through watching the headers. Be sure to check out the response tab for the 'apply filter' ajax: the response should be 'true'.
    If no ajax call pops up however, the problem is with the onSelect of the autocomplete and/or the search button.

  • Capturing Interactive Report Filter Fields

    I've a requirement where in a user can view data, apply filters to it, and then invoke an Oracle API by passing in the data set currently visible on the report.
    If I can some how capture currently applied filters on an Interactive report, I should be able to recreate the same data on the server side before calling the Oracle API.
    Is there a way to capture these Filter field out of the Interactive report?
    Thanks,
    Shikhar

    Thanks again Jari.
    I compiled Stew's package and setup a call like this:
    DECLARE
       v_variable   VARCHAR2 (5000);
    BEGIN
           v_variable := apex_ir_query.IR_QUERY_WHERE (app_id_in => 125,
                                        page_id_in => 2,
                                        session_id_in => 1058992121588043,
                                        base_report_id_in => 6902307847490674);
       DBMS_OUTPUT.PUT_LINE ('Query: ' || v_variable);
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.PUT_LINE ('Exception :' || SQLERRM);
    END;But this didn't return anything. Did some digging and ran the SQL below:
       SELECT * FROM apex_application_page_ir_cond cond where application_id = 125Which revealed interactive report id values different from the ones returned by $v('apexir_REPORT_ID'); $v('apexir_REPORT_ID') returns 6902307847490674 but in the table its 7.76121620735057E15 (My Apex version is 3.2).
    I'm not going to pursue it further, as I've decided to implement custom filtering functionality using ape_util.ir_query package. Thanks for your valuable help with this issue. Closing the question.
    Edited by: user4368002 on Jul 16, 2010 2:00 PM

  • Interactive report with fixed header

    hi @all
    is it possible to create a scrollable interactive (freeze panes) report?
    if so how?

    include the frs-table-header.js and jquery in your html header
    the frsIRSetup checks the value of a checkbox (#P' + gPAGEID + '_FREEZE_TABLE_HEADER_0) on the page so our users can enable/disable the freezing. and can just remove the if logic or hardcode the value of chk in frsIRSetup to always be true if you want to always enable scrolling.
    this should work for both IE and Firefox.
    I also include the following in the html header to make javascript files easy to deal with
    <script language="JavaScript1.1">
    var gAPPID = &APP_ID.;
    var gSESSION = &SESSION.;
    var gDEBUG = "&DEBUG.";
    var gPAGEID = &APP_PAGE_ID.;
    </script>frs-table-header.js
    * browser identity
    var cBrowserMozilla = "mozilla";
    var cBrowserMSIE = "msie";
    var cBrowserSafari = "safari";
    var cBrowserOpera = "opera";
    var gBrowser;
    var gOldInit;
    var gIRInit = false;
    function setBrowser() {
      var b = $.browser;
      if (b.mozilla)
        gBrowser = cBrowserMozilla;
      else if (b.msie)
        gBrowser = cBrowserMSIE;
      else if (b.safari)
        gGrowser = cBrowserSafari;
      else if (b.opera)
        gBrowser = cBrowserOpera;
      else gBrowser = null;
    * ir scroll support
    var frsIRHeight = '500px';
    function frsIRInit(pId) {
      this.l_Action = false;
      this.l_Type = false;
      this.ajax_busy = false;
      if(!!pId){this.worksheet_id = pId}
      this.report_id = ($v('apexir_REPORT_ID'))?$v('apexir_REPORT_ID'):'0';
      this.get = new htmldb_Get(null,$v('pFlowId'),'APXWGT',$v('pFlowStepId'));
      var tab = $("table.apexir_WORKSHEET_DATA");
      var head = $("tbody tr:fiest-child", tab).html();
      if (gIRInit == false) {
        gIRInit = true;
        $("tbody", tab).before("<thead>" + head + "</thead>");
        $("tbody tr:first-child", tab).remove();
      if (gBrowser == cBrowserMozilla) {
        $("tbody", tab).css({'overflow-y' : 'auto', 'overflow-x' : 'hidden', 'height' : frsIRHeight});
        tab.css({'border-collapse' : 'separate'});
      } else if (gBrowser == cBrowserMSIE) {
        tab.wrap('<div id="frsIR" style="overflow-y: auto; overflow-x: hidden; height: '+frsIRHeight+'; width: 100%; position: relative"></div>');
        $("thead tr th", tab).addClass("frsHeaderIRScroll");
    function frsIRSetup() {
      var chk = $('#P' + gPAGEID + '_FREEZE_TABLE_HEADER_0').is(':checked');
      setBrowser();
      if (gBrowser == null)
        return;
      if (gOldInit == null) {
        gOldInit = gReport.init;
      if (chk) {
        gReport.init = frsIRInit;
      } else {
        var tab = $("table.apexir_WORKSHEET_DATA");
        $("thead tr th", tab).removeClass("frsHeaderIRScroll");
        $("tbody", tab).removeAttr("style");
        gReport.init = gOldInit;
      gReport.init();
    }Add the following to the IR region footer
    <script type="text/javascript">addLoadEvent(frsIRSetup);</script>

  • Retrieve SQL with filters applied from an Interactive Report

    I want to use an Interactive report as interface for providing parameters to a base report query.
    I would like to capture the full SQL code from the filtered interactive report and then run the sql to create a collection.
    I have found this tread
    Re: Using Data from filtered Interactive Report
    which says that you can use APEX_APPLICATION_PAGE_IR to access the reports SQL. This holds the information about the interactive report when the user saves it. The sql code from the interactive report (after the user has added filters) is stored in the field sql_query.I can only retrieve the base query and not the filtered version even after saving.
    Any ideas how this can be done would be appreciated.
    regards
    PP

    OK Darren I think I've got it working. My solution is an adaption that follows the steps of a blog I found here: http://stewstools.wordpress.com/2009/02/19/get-ir-where-clause/
    My solution allows you to click on a button and the records that are currently displayed in the IR report are saved to an APEX collection. You can then use the collection to save records to a table or run a report on another page. (I haven't included code for this last step but it's easy to find on the forum)
    First a bit of background knowledge. The following APEX views hold all the information on IRs that you access via PLSQL code in the package you need to download. Run an IR report, save a version of the report, then in SQL Workshop have a look at:
    select * from APEX_APPLICATION_PAGE_IR
    select * from APEX_APPLICATION_PAGE_IR_COND
    select * from APEX_APPLICATION_PAGE_IR_COL
    select * from APEX_APPLICATION_PAGE_IR_RPT
    When you run an IR report it has an internal ID that you can access and also a Base Id for each Saved report that is currently in context.
    Here are the steps:
    1) Download the following package and install it in the workspace schema
    http://www.mediafire.com/?nj118x9vmc9
    click on the link "click here to download"
    2)In the HTML header Attribute of the page where your IR runs, put the following Javascript:
    <!--===================================================================-->
    <!--FUNCTION TO RETRIEVE IR REPORTS SQL WITH WHERE CLAUSE
    <!--===================================================================-->
    <script language="JavaScript" type="text/javascript">
    function SaveAndRunReport() {
    document.location='f?p=&APP_ID.:3:&SESSION.:CONSTRUCT_IR_QUERY:NO::'+
    'P3_BASE_REPORT_ID:'+$v('apexir_REPORT_ID');
    </script>
    <!--===================================================================-->
    Notes: You will need to obviously change the URL above to reflect your Page No. (3) and the name of a HIDDEN Item (P3_BASE_REPORT_ID) that you will populate with the base ID of the report.
    Setting :P3_BASE_REPORT_ID to +$v('apexir_REPORT_ID') is an internal thing and works out of the box. It returns the Id of the Base report.
    3) Create a button called SELECT_SPECIMENS (in region position - top of region) in the IR region that will initiate the execution of the IR background SQL to create a collection with the current selected records.
    TARGET= URL
    URL Target = javascript:SaveAndRunReport();
    You might also want to create a condition that only shows the button when there are records selected
    CONDITION TYPE=Exists(SQL returns at least one row)
    EXPRESSION 1 - put the SQL of the IR report here.
    4)Create a branch back to the same page (3) and with the REQUEST attribute set to the value in the Javascript URL above e.g. CONSTRUCT_IR_QUERY. Create a condition on the branch that uses this branch WHEN BUTTON PRESSED= SELECT_SPECIMENS
    5) Create an AFTER HEADER PROCESS with the following code:
    declare
    v_base_query clob;
    v_where clob;
    v_query clob;
    v_base_where varchar2(12):=' where 1=1 '; -- incase there is no where clause in the base query
    begin
    if apex_collection.collection_exists('IR_COLLECTION') THEN
    htmldb_collection.delete_collection( p_collection_name => 'IR_COLLECTION');
    end if;
    --GET THE BASE QUERY OF THE IR REPORT
    select sql_query
    into v_base_query
    from APEX_APPLICATION_PAGE_IR
    where application_id=:APP_ID
    and page_id=:APP_PAGE_ID; -- you can only have one IR report per page
    --UNCOMMENT TO VIEW THE PARAMETERS TO THE PACKAGED FUNCTION
    --raise_application_error(-20001, :APP_ID||'-'||:APP_PAGE_ID||'-'||:SESSION||'-'||:P3_BASE_REPORT_ID);
    --GET THE SQL FILTER CODE
    select apex_ir_query.ir_query_where(:APP_ID,:APP_PAGE_ID,:SESSION,:P3_BASE_REPORT_ID)
    into v_where
    from dual;
    --CHECK TO SEE THAT THERE IS A "WHERE" CLAUSE IN THE BASE QUERY
    if instr(upper(v_base_query),'WHERE ') > 0 then
    v_query:=v_base_query||' '||v_where;
    else
    v_query:=v_base_query||' '||v_base_where||' '||v_where;
    end if;
    --UNCOMMENT TO SEE THE FULL QUERY SYNTAX
    --raise_application_error(-20001,v_query);
    --CREATE COLLECTION FROM IR RECORDS
    apex_collection.create_collection_from_query(P_collection_name=>'IR_COLLECTION',p_query=>v_query);
    exception
    when others then
    raise_application_error(-20001, 'Interactive report not found. Contact Administrator. Could not create collection of records.');
    end;
    remember to update P3_BASE_REPORT_ID above to your HIDDEN ITEM name.
    Set the following attributes for the process above
    CONDITIONAL PROCESSING
    CONDITION TYPE = Request=Expression 1
    EXPRESSION 1 --> CONSTRUCT_IR_QUERY (Note: this was set on the branch in step 4 above)
    6) Run the IR report, click on the "SELECT SPECIMENS" button then click on the Session link on the Developer's Toolbar and select VIEW COLLECTIONS from the popup list then click GO. You should now see the IR records.
    By the way I've been testing in IE not Firefox.
    ...and that's it!
    enjoy
    Paul P

  • Searching 2 years either side of a date field?

    Hi
    In my query I would like the search to be able to search 2 years either side of a specified search date in my interactive report
    select
    ROWID,
    ID,
    COLUMN1,
    COLUMN2,
    TO_CHAR(INDDOB, 'YYYY') AS NEWYEAR
    from TABLENAME
    ORDER BY INDDOB asc
    The interactive report is also using custom Javascript to offer an autocomplete search as per this thread For VC - Using multiple Autocomplete on a page?
    So I am unsure how this would work by allowing the date results to include 2 years either side of the chosen date?

    Mike many thanks for this
    INDDOB is a date field in the DB and the item name is :YEARD
    Using the following WHERE clause and a default vale of 1930 in the :YEARD item name is returning the correct result i.e. 1930 plus records from 1928,1929,1931 and 1932
    select
    ROWID,
    ID,
    INDSUB,
    INDDOD,
    INDREG,
    INDENT,
    INDDOD,
    INITCAP(INDSNAME) indsname,
    INITCAP(INDFNAME) INDFNAME,
    TO_CHAR(INDDOD, 'YYYY') AS NEWYEAR,
    DELDOC from   RAMBO.TABLENAME
    WHERE to_char(INDDOD,'YYYY') between :YEARD -2 and :YEARD +2
    ORDER BY INDDOD asc
    The problem is however when I try and change the search value in :YEARD from the default 1930 to for example 1950 (which is also in the db)
    When doing this it brings back no results? Could it be something to do with the associated code below which provides an autocomplete feature and search of the IA report as you type in the field name.
    In the :YEARD item under label and HTML table Cell attributes has the following
    onkeydown="if($f_Enter(event)){srch3($v('YEARD')); return false;}"
    and under the list of values in the definition for :YEARD is
    select distinct TO_CHAR(INDDOD, 'YYYY') from RAMBO.TABLENAME order by 1
    Also under page and Javascript is the following
    function srch2(pItem, pColumn) {  
       $.post('wwv_flow.show',
              {"p_request"          : 'APXWGT',
              "p_widget_action"     : 'FILTER',
              "p_widget_action_mod" : 'ADD',
              "p_widget_mod"        : 'ACTION',
              "p_widget_name"       : 'worksheet',
              "p_flow_id"           : $v('pFlowId'),
              "p_flow_step_id"      : $v('pFlowStepId'),
              "p_instance"          : $v('pInstance'),
              "x01"                 : $v('apexir_WORKSHEET_ID'),
              "x02"                 : $v('apexir_REPORT_ID'),
              "x03"                 : pColumn,
              "f01"                 : ['COLUMN', pColumn, '=', $v(pItem), null, 'minutes']
             function(data){
                //when the filter has been successfully applied the report has to be refreshed
                if(data=="true"){
                   gReport.pull();
       //clear the item
       $s(pItem,'');
    $(document).ready(function(){
       //hide IR toolbar
       $('#apexir_TOOLBAR').hide();
       $('#P4_AC').bind("result", function(){   
          //on selecting a value then fire the search function
          srch2(this, 'INDSNAME');
       // ac item P4_AC2
       $('#P4_AC2').bind("result", function(){   
          srch2(this, 'INDFNAME');
       // ac item YEARD
       $('#YEARD').bind("result", function(){
          srch2(this, 'NEWYEAR');
    // ac item REG
       $('#REG').bind("result", function(){
          srch2(this, 'INDREG');
    // ac item ENTNO
       $('#ENTNO').bind("result", function(){
          srch2(this, 'INDENT');

  • Open file with javascript

    Hello all ,
    I used the package in the Denes Kubicek demo page: http://htmldb.oracle.com/pls/otn/f?p=31517:118:651492651950833::NO, to Export report data into XML file and it works fine.
    I'm now using it in a Shared process being called from Javascript in the page, my problem is that in this way i can't download a file.
    Javascript
    <script type="text/javascript">
    function carregar_report_id()
    var temp_ir_id = document.getElementById('apexir_REPORT_ID').value;
    var temp_page_id = document.getElementById('pFlowStepId').value;
    var ajaxRequest = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=CARREGAR_REPORT_ID',0);
    ajaxRequest.add('GLOBAL_IR_ID',temp_ir_id);
    ajaxRequest.add('GLOBAL_PAGE_ID',temp_page_id);
    var ajaxResult = ajaxRequest.get();
    if(ajaxResult)
              //document.getElementById('teste_listagem').innerHTML = 'update_selected_template:' + ajaxResult + '
              //alert("XML criado: " + ajaxResult);     
              document.write(ajaxResult);
              //document.getElementById('xml_div').innerHTML = ajaxResult;          
    else
    alert('Erro de Aplicação, #create_ir_xml# contactar administrador!');
    ajaxRequest = null;
    </script>
    Shared Process
    DECLARE
    id_region NUMBER;
    BEGIN
    select region_id into id_region from apex_application_page_regions where APPLICATION_ID= :APP_ID AND PAGE_ID= :GLOBAL_PAGE_ID AND SOURCE_TYPE='Interactive Report';
    export_xml_pkg.print_report (id_region,'RelatorioIR_'||:GLOBAL_PAGE_ID,:GLOBAL_PAGE_ID);
    END;
    How can i open the xml file in a new tab with javascript??
    Regards Pedro.

    As a short term workaround, you could package it with Firefox on the USB flash drive to work around the tendency of the installed Firefox to look to its own profile folder.
    Possible discussion forums:
    (1) Add-ons - https://forums.mozilla.org/addons/
    Not sure if they talk about webapps or just the more conventional kinds of add-ons.
    (2) Mozillazine - http://forums.mozillazine.org/
    Again, not sure there is a board for this yet.

Maybe you are looking for