Skip to main content

How to Display Dynamic Page Item Values in Oracle APEX Region Headings

 

Introduction

Oracle APEX provides built-in region titles for reports and Interactive Grids. However, in enterprise applications developers often need more control over the appearance of page headings, especially when displaying contextual information such as employee names, vehicle numbers. 

This article demonstrates how to create a custom styled heading with dynamic page item values above a report region while avoiding duplicate titles and unnecessary spacing.

Prerequisites  
· One Interactive Grid region named Service Request Detail 
· Basic familiarity with APEX Page Designer

Objective

We want to display a styled heading such as 'Vehicle Service Request Details : [Vehicle No - Vehicle Description]' above a report region by combining a Static Content region with the substitution string &P398_VEHICLE_NO.

Solution

Step 1: Create Interactive Report Region

 a) Set the Report Region Title

In Page Designer, click your report region (e.g., Service Request Details). Under Identification, set the Title field to match your region name:

 
Figure : 1
 b) Configure Region with SQL Query
Under Source
Location: Local Database
Type:  SQL Query
SQL Query:

SELECT
      ROW_NUMBER() OVER (ORDER BY req.posted_date DESC) AS SNO,
       req.req_id,
       req.vehicle_id,
       v.vehicle_no,
       req.emp_id,
      req.posted_date,
      v.vehicle_type
FROM veh_servicerequest req,
     veh_vehicle_setup v
WHERE req.vehicle_id = v.vehicle_id
and  req.bill_posted = 'Y'

Figure : 2

Step 2: Create Page Item

·          Create page item: P398_VEHICLE_NO

·          Set type: Hidden

Figure : 3

Under Source

·         From Region Select

·         Type  SQL Query (return single value)

·         SQL Query

SELECT vehicle_no || ' - ' || vehicle_desc
FROM (
SELECT v.vehicle_no,
v.vehicle_desc
FROM veh_servicerequest req,
veh_vehicle_setup v
WHERE req.vehicle_id = v.vehicle_id
AND req.bill_posted = 'Y'
ORDER BY req.posted_date DESC
)
WHERE ROWNUM = 1;

  
    
Figure : 4

Step 3: Add a Static Content Region for the Heading

Add a styled heading above your report region:

1   Right-click your page in the Page Designer tree → Create Region

Figure : 5

2  Under Identification, set the Title of this new Static Content region to: Service Request Details

Note: The Title field is mandatory in APEX and cannot be left blank.

3   Set Type to Static Content

Figure : 6

4  Under Source → HTML Content, paste the following:

Figure : 7

<div style="

  width: 100%;

  display: flex;

  align-items: center;

  background: #98AFC7;

  padding: 4px 25px;

  border-radius: 10px;

  box-shadow: 0 4px 10px rgba(0,0,0,0.2);

">

  <h2 style="

  font-family: 'Roboto', 'Segoe UI', sans-serif;

  font-size: 27px;

  color: #f8f9fa;

  font-weight: 500;

  margin: 0;

  letter-spacing: 0.8px;

">

  Vehicle Service Request Details  :  &P398_VEHICLE_NO.

</h2>

</div>

Note: &P398_VEHICLE_NO. is an Oracle APEX substitution string. At runtime, Oracle APEX replaces it with the value of the page item P398_VEHICLE_NO.

5        Set the region sequence so it appears just above your report region

Step 4: Hide the Built-in Title Using Template Options

To prevent the duplicate heading, hide the report region's built-in title:

1.      Click your report region in Page Designer

2.      Go to Appearance → Template Options → Click the button

3.      Find the Header setting and select Hidden but accessible

Figure : 8

4.      Click OK and Save the page

 Step 5: Remove the Gap between Heading and Report

A spacing gap often appears between the Static Content heading region and the report region below it. To fix this:

  1. Run the page in Oracle APEX
  2. Hover over the Static Content heading region  a pencil () icon will appear in the top-right corner of the region
  3. Click the pencil icon to open Quick Edit
  4. In the Quick Edit panel, click Template Options
  5. Set Top Margin to None
  6. Set Bottom Margin to None
Figure : 9
  1. Click OK
  2. Save the page and refresh to confirm the gap is removed

Step 6: Save and Run

Save the page and run it to verify that the styled heading displays correctly with the Oracle APEX substitution value of the page item and without spacing gaps.

Figure : 10

Conclusion

In this article using a Static Content region together with dynamic page item provides a flexible way to create professional report headings in Oracle APEX. This approach improves UI clarity and gives developers full control over styling while remaining fully compatible with the Universal Theme.

 



Comments

Popular posts from this blog

Oracle EBS R12 General Ledger (GL) Module – Practical SQL Queries

Introduction Oracle E-Business Suite (EBS) R12 General Ledger (GL) is the core Financial module in Oracle EBS R12. It is used to manage journal entries, accounting periods, balances, and financial reporting. The GL module integrates with Payables (AP), Receivables (AR), Fixed Assets (FA), Purchasing (PO), and Inventory (INV). The main purpose of a general ledger system is to record financial activity of a company and to produce financial and management reports to help the organization make decisions. Below are real-world SQL queries commonly used.   1) View configured Ledgers      Purpose: Fetch Ledger Configuration Details SELECT       ledger_id,      name  AS   ledger_name ,    short_name ,   currency_code FROM     gl_ledgers ORDER BY     ledger_id ;   2) Ledger Information Query Purpose: Fetch Ledger Configuration Details SELECT     gl.name   ...

Oracle ERP R12 Purchasing Module – Useful SQL Queries Every Developer Should Know

Oracle Purchasing (PO Module) in Oracle ERP R12 has a significant role by managing requisitions and purchase orders . It integrates with key modules such as Inventory, Payables, and General Ledger to ensure smooth business operations. Below are real-world SQL queries commonly used. Note: Replace :ORG_ID with your Operating Unit ID (e.g., 89)  and :PO with the required PO number (e.g., 'PO-10045')   1) Purchase Order Header Details Purpose: Get basic PO information for specific Org SELECT     pha.segment1 AS po_number,     pha.type_lookup_code AS po_type,     pha.authorization_status,     pha.creation_date,     pv.vendor_name,     pv.vendor_id FROM     po_headers_all pha,     po_vendors pv WHERE     pha.vendor_id = pv.vendor_id     AND pha.org_id = :ORG_ID;     2) Purchase Order Line De...

Exploring AI in Oracle APEX 26.1

Artificial Intelligence (AI) is transforming the way organizations and developers work. Businesses and professionals are increasingly adopting AI tools to improve productivity, automate processes, and build smarter applications. Oracle APEX introduces a significant evolution in application development by integrating governed Generative AI capabilities directly into the low-code platform. This enables developers to build intelligent, conversational applications while maintaining enterprise-grade security and control. In this article we explore AI capabilities in Oracle APEX 26.1 What is AI Agents AI Agents can be created to reason over user requests and take actions through approved AI Tools. Each tool exposes a specific application capability the agent is allowed to invoke, such as retrieving data, running server-side PL/SQL, or executing client-side JavaScript. APEX manages the execution flow by preparing context, dispatching tool calls, executing tools, handling results, and...