Skip to main content

Command Palette

Search for a command to run...

Goodbye Interactive Grid Workaround: Check the new Interactive Report JS Interface

Hidden Gems in Oracle APEX 26.1 - Part1

Updated
5 min read
Goodbye Interactive Grid Workaround: Check the new Interactive Report JS Interface
M

I'm Mohamad, a versatile software developer with a passion for creating innovative solutions and solving complex problems. Throughout my career, I've had the opportunity to work on a variety of projects and technologies, such as JavaScript, Oracle APEX, PL/SQL, and SQL. I'm not just a developer; I'm a problem solver who enjoys tackling challenges head-on. I thrive in collaborative environments and am constantly exploring new technologies to stay at the forefront of the industry.

The wait is over, Oracle APEX 26.1 is finally here. Most of the buzz right now is centered around the big headline features like APEXLang and the new AI capabilities. And yes, they’re exciting, powerful, and absolutely worth exploring.

But here’s the thing:

APEX 26.1 is packed with far more than just AI and APEXLang!

A lot of other great enhancements in this release aren’t getting the spotlight they deserve. So in this series, we’re stepping away from the hype for a moment to look at the rest of what APEX 26.1 brings to the table, the practical improvements, the quality‑of‑life updates, and the features that will quietly make your daily development smoother.

This post kicks off that journey, so let's dive in 😎.

JS Interface for the Interactive Report

For years, developers relied on the Interactive Grid, often with editing turned off, just to get features missing from the Interactive Report.
Not anymore. With this release, the Interactive Report gets its biggest upgrade yet, offering nearly the same power as an Interactive Grid without inline editing. And we’re starting with the new interactiveReportRegion JS interface, which finally gives developers direct programmatic access to an Interactive Report, something that previously required workarounds, undocumented hooks, or switching to an Interactive Grid.

getCurrentRow & getCurrentRowValue

The getCurrentRow method returns the jQuery object of the focused row or the last focused row, while the getCurrentRowValue method returns the ID (the primary key). If the user changes the pagination, then the focused row is the first row in the report.

For example, let's say you have an Interactive Report that has a static ID product (starting from APEX version 26.1, this attribute is now referred to as HTML DOM ID).

You can run the following code in your console to test the methods

var row$=apex.region( "product" ).getCurrentRow();
// or to get the ID
var id=apex.region( "product" ).getCurrentRowValue();

But wait!! Where is this ID or primary key coming from? 🤔

The Interactive Report will automatically add a data-id HTML attribute to each rendered row. This value is derived from the column designated as the primary key. If your primary key column has a name other than "ID," the report will also include a data attribute with the same name as your primary key column, along with a checksum of your primary key value.

getSelection & getSelectedValues

Those methods will do the same as getCurrentRow and getCurrentRowValue, respectively. But instead of querying the focused row, those methods query the selected rows.

For example, if your user selects some rows using the APEX$ROW_SELECTOR checkbox column, you can get the IDs of the selected rows by simply using the following JS

apex.region( "product" ).getSelectedValues();
// or to get the JQuery objects of the selected rows
apex.region( "product" ).getSelection();

This feature is very useful, but what happens if the user navigates through the report? No worries, APEX has you covered 😎. The selection is persistent until the region or page is refreshed. In practice, this means a user can select rows on the first page of the report, move to the next page, and their previous selections remain intact. They can even continue selecting rows across multiple paginations, and APEX will keep track of everything.

selectAll & setSelectedValues

The selectAll method, as the name implies, selects all rows displayed on the current report page (i.e., the rows currently visible). In contrast, the setSelectedValues method allows you to select specific rows by providing an array of IDs (Primary keys) of those rows as a parameter.

For example, if you want to select the rows with the IDs 1,2, and 3, you run the following JS code:

apex.region( "product" ).setSelectedValues(["1","2","3"],true, true);
// or to select all rows in the current report page
apex.region( "product" ).selectAll();

Notice the additional parameters in the setSelectedValues methods. The first one indicates whether to highlight the selected records, and the second one suppresses the selection changed event of the Interactive report.

❗️ You need to add the APEX$ROW_SELECTOR column in your interactive report in order to use those methods, otherwise you will get null or undefined.

refresh

The last method we will discuss in this post is the refresh method. What does this method do? Simply put, it refreshes the report 🙈. The key takeaway here is that you can pass a parameter to the refresh method to control pagination and scroll behavior. For example, if a user navigates to the 10th page of the report and applies some filters, you can refresh the report with the new data without returning the user to the first page or scrolling them back to the top. It's easy to achieve this; just set the parameter pKeepPagination to true.

apex.region( "product" ).refresh();

And that’s it, you’ve now seen how the new refresh method fits into the upgraded Interactive Report experience.

Conclusion

The improvements to Interactive Reports in APEX 26.1 finally close a long‑standing gap for developers. With a modern JS interface, persistent selections, and powerful methods like setSelectedValues and getSelectedValues, you now have more control over IRs than ever before. Interactive Reports are no longer the “lightweight” alternative to Interactive Grids, they’re becoming a genuinely powerful option in their own right. And this is just the beginning. In the next part of this series, we’ll dive deeper into what else APEX 26.1 brings to the table.

References

https://docs.oracle.com/en/database/oracle/apex/26.1/aexjs/interactiveReportRegion.html#refresh

AI tools were used to help draft portions of this work.