Category Archives: Apex Reporting

“Oracle APEX Reporting Tips & Tricks” – Out Now!

I am extremely proud to announce the release of my new software development book: “Oracle APEX Reporting Tips & Tricks”.

If you are keen in learning a very robust Rapid Application Development (RAD) tool for web-based applications using Oracle Application Express (APEX), or if you just want to get yourself familiarized with the new trends in database development, this is the book for you. From conception to publication, it took me over 2 years to get this done, with numerous reviews, rewrites and constantly keeping up with the new Oracle Application Express releases (updated for the latest APEX 4.2 release).

Available in iPub format (iPhone, iPad, NOOK, Kindle and PC) and also in paperback format:

iBook Store

iBooks Store

Barnes & Noble - NOOK

Barnes & Noble – NOOK

Amazon Kindle

Amazon Kindle

“Take advantage of all the exciting Reporting features of Oracle Application Express 4.2. Designed for a hands-on approach, this book will give you in-depth practical guidelines from George Bara, a well-known APEX expert and blogger. From Classic to Interactive Reports, Web Services and PDF Printing, this book is must-have for all developers that want to get the most out of the Oracle APEX 4.2. reporting engine.”

Best Regards,

George Bara

The function for APEX Interactive Reports

The gReport.searchfunction is used internally by Interactive Reports when a filter is applied on the report. Even if the function is not documented by Oracle, taking a look at the source code for the Interactive Report Search Field gives us a clue about how the function is used internally:

  <input title=”Search Report” type=”text” size=”30″ maxlength=”4000″ value=”” id=”apexir_SEARCH” onkeydown=”if($f_Enter(event))
            {‘SEARCH’); return false;}”/>
        onclick=”‘SEARCH’)” >

The code above defines the Search Field input item and adds the search action for when the Enter key is pressed:

onkeydown="if($f_Enter(event))          {'SEARCH'); return false;}

Similar code is used for the Go button:


The code snippets above reveals the fact that the‘SEARCH’) function is called to refresh and filter the Interactive Report on the fly, without refreshing the entire page.

Report filtering using gReport.Search

Using the function described above, you can create custom filter mechanisms on Interactive Reports. For example, you can create an Interactive Report dynamic filtering mechanism based on a simple select list.

  1.  Create a Select List item in the same region as the existing Interactive Report.
  2.  Fill in the Label field with the value P15_FILTER.
  3. For the List of Values Query, paste in the following query and create the item:select distinct JOB display_value, JOB return_valuefrom EMP
  4. Open the created select list and go to the Element Section. Set the HTML Form Element Attributes to: onchange=”filterReport()”
  5. This will trigger the filterReport() JavaScript function each time the select list value is changed.
  6. Edit the page when the Interactive Report and select list are created, go to the JavaScript tab and add the filterReport() function code in the Function and Global Variable Declaration:

function filterReport()
   var selList = document.getElementById(‘P15_FILTER’);
   var IR = document.getElementById(‘apexir_SEARCH’);
   IR.value  = selList.value;‘SEARCH’);

When selecting a value from the select list containing the job titles, the selected value will be assigned to the Interactive Report’s search field and the report will be filtered dynamically on this value.

The code above simply gets the select list value (document.getElementById(‘P15_FILTER’).value) and assigns it to the apexir_SEARCH item, which is actually the report’s search field. Then, the function is called to filter the Interactive Report.

Create a custom download link for an Interactive Report

The default method of downloading an Interactive Report is clicking on the Action button, then the Download button and then selecting the desired format.

For the CSV report download format:

The download link will be:


For the the HTML report download format:

The download link will be:



The download link structure is:


Continue reading