Skip to Main Content

"Fix" APEX 3.2 interactive report Rows select list

APEX 3.2 interactive report Rows select list is not reset when you reset report. You can do test. Change rows to display e.g. to one and press Go button. Then reset report from action menu. Rows select list value is still one. Here is how you can change that feature.

Create On Demand process GET_IR_DISPLAY_ROWS

DECLARE
  l_rows NUMBER;
BEGIN
  SELECT display_rows
  INTO l_rows
  FROM apex_application_page_ir_rpt
  WHERE report_id = APEX_APPLICATION.G_x01
    AND session_id is null;
  htp.prn(l_rows);
EXCEPTION WHEN NO_DATA_FOUND
THEN
  htp.prn('NOK');
END;

Create HTML region to page zero.

Set region Display Point to "Before Footer" and Template "No Template".

Insert to Region Source:

<script type="text/javascript">
 function htmldbIrAction(){
  if($x('apexir_WORKSHEET_REGION')){
   gReport.action=function(p_widget_action,p_widget_action_mod,p_id,p_value,p_x05,p_x06,p_x07,p_x08,p_x09,p_x10){
    if(p_widget_action=='RESET'){
     var a=new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_IR_DISPLAY_ROWS',$v('pFlowStepId'));
     a.addParam('x01',$v('apexir_REPORT_ID'));
     var r=a.get();
     if(!isNaN(r)){$s('apexir_NUM_ROWS',r)}
    }
    this.l_Action=p_widget_action;
    this._Get('ACTION',p_widget_action,p_widget_action_mod,p_id,p_value,p_x05,p_x06,p_x07,p_x08,p_x09,p_x10);
   }
  }
 }
addLoadEvent(htmldbIrAction);
</script>

Comments

No comments yet on this post