This discussion is archived
0 Replies Latest reply: May 6, 2013 7:43 PM by Ann586341 RSS

Apex 4.0 combine reset interactive report into the reports select list

Ann586341 Newbie
Currently Being Moderated
Hello everyone,

I was asked to make saved Interactive Report back to default anytime the user choose from the Report Dropdown List.
I know that if user log out and re log in their session, the saved Interactive report will be set to Default, or if they click Reset Button from Action Menu, it will also reset the current report back to default.

The version of APEX at my workplace is 4.0.2. Oracle db version is 11g R1.
Plan to upgrade to 4.2 still need approval from manager and will not likely happen in this year.

So far what I tried is, create a dynamic action on jquery selector
$('#apexir_SAVED_REPORTS');

Event : Change
Selection Type: jquery selector
#apexir_SAVED_REPORTS
Condition: is not null

Action: execute Javascript
Code:
gReport.reset();

However, onchange of the select list still overwrite the reset one.
Even if I change the Event from Change to Click or Select
Event Scopt to Live or Bind.
It seems that I cannot overwrite the gReport.pull in the apex generated code below.
<select onchange="gReport.pull(this.value,'REPORT_CHANGED')" name="p_accept_processing" id="apexir_SAVED_REPORTS" size="1">
<optgroup label="Default"><option value="184491124613317125">1. Primary Report</option>
<option value="184510420868195812" selected="selected">2. By Seminar Year</option></optgroup></select>
I even put this code into the HTML header
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
$(document).ready(function() {
     $("#apexir_SAVED_REPORTS").removeAttr("onchange");
     $("#apexir_SAVED_REPORTS").change(function() {
          gReport.pull(this.value,'REPORT_CHANGED');
          gReport.reset();
     });
});
</script>
But it still does not work.
I don’t know what I do wrong here. I am still a newbie about Javascript and Jquery.
If anyone has any ideas, please help.

Thanks a lot in advance.
Ann

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points