This Oracle APEX utility provides a simple and reusable way to open report-based actions (such as print, preview, or detail view) in a new browser tab using a lightweight JavaScript handler.
Instead of using APEX dialog or drawer navigation, this approach allows developers to:
- Open a specific APEX page in a new tab
- Pass row-level data dynamically using data-* attributes
- Avoid duplicate JavaScript code across multiple reports
- Maintain a clean and scalable UI interaction pattern
The solution is designed for Interactive Reports, Interactive Grid and Classic Reports, where each row contains a clickable icon (e.g., print button) that triggers navigation to a target page with required parameters.
This pattern is especially useful for:
- Print / Invoice preview pages
- Report detail views
- Transaction-based systems
- Multi-page APEX applications requiring reusable navigation logic
Overall, it improves maintainability, reduces redundancy, and standardizes how report actions are handled across an Oracle APEX application.
👉 Target :
javascript:void(0)
👉 Link Text :
<span class="t-Icon fa fa-print print_btn"
data-trn-id="&TRN_ID."
aria-hidden="true"></span>
👉 Link Attributes :
class="t-Button t-Button--hot t-Button--stretch t-Button--simple t-Button--small"
$(document).on("click", ".print_btn", function (sr) {
var trnId = $(this).data("trn-id");
window.open(
'f?p=&APP_ID.:274:&APP_SESSION.::NO::P274_TRN_ID:' + trnId,
'_blank'
);
});
Flow
- User clicks print icon in report row
- jQuery captures .print_btn click
- TRN_ID is read from data-trn-id
- APEX URL is dynamically built
- Page 274 opens in a new browser tab
❌ Do NOT use dialog page (Page 274 must be NORMAL page) Because:
- Modal Dialog pages cannot be reliably opened in new tabs
- They require APEX dialog framework
- ✔ Simple implementation uses window.open()
- ✔ Data comes from data-trn-id
- ✔ No inline JavaScript needed in report
- ✔ Fully reusable and scalable approach
- ✔ Works for all APEX report types