Search This Blog

Wednesday, July 23, 2025

How Do I Use the Contextual Info Report Template Component in Oracle APEX

The Contextual Info report template in Oracle APEX is designed to present data in a compact and visually organized way, highlighting key information alongside related details. It is often used when you want to display a list of items where each item has a title, supporting text, and contextual icons or badges that provide additional information at a glance. This template enhances user experience by making reports more readable and interactive, especially on dashboard or summary pages.

How to Use the Contextual Info Report Template Component in Oracle APEX

Using the Contextual Info report template involves creating a report region and applying the appropriate template while mapping the data fields properly to leverage the template’s features. Here is how to implement it in detail:

  1. Create a Report Region

    • In Oracle APEX App Builder, open the page where you want to add the report.

    • Click + Add Region and select a report type such as Classic Report or Interactive Report.

    • Provide a meaningful name for the region, for example, "Project Overview".

  2. Write Your SQL Query

    • Your SQL query should return columns that will be mapped to the contextual info fields.

    • Example:

      SELECT project_name,
             project_manager,
             status,
             start_date,
             end_date,
             priority
        FROM projects
       WHERE status = 'Active'
      
    • Include any columns you want to use as titles, subtitles, badges, or dates.

  3. Apply the Contextual Info Report Template

    • In the region attributes, find the Template property.

    • Select Contextual Info or a similarly named template (the exact name may depend on your APEX version and theme).

    • This template structures the output into a main title, supporting text, badges, and optional icons.

  4. Map Columns to Template Positions

    • Map the SQL query columns to the Contextual Info template fields, such as:

      • Titleproject_name

      • Subtitleproject_manager

      • Badgepriority (e.g., High, Medium, Low)

      • Additional Info → formatted dates or status

    • You can use substitution strings in the template or the region’s settings to format this data.

  5. Customize Appearance and Behavior

    • Configure badges with different colors based on values (for example, red for “High” priority).

    • Use CSS classes or APEX template options to adjust spacing and font sizes.

    • Enable links on titles or badges if you want navigation to detail pages.

  6. Preview and Adjust

    • Run the page and verify the contextual info layout.

    • Adjust SQL, mappings, or styles as needed for clarity and visual appeal.

Examples

Example 1: Project Status Overview

  • Title: Project Name

  • Subtitle: Project Manager

  • Badge: Priority with color coding (High = red, Medium = yellow, Low = green)

  • Additional Info: Start and end dates formatted as “Jan 1 – Dec 31”

Example 2: Employee Directory

  • Title: Employee Name

  • Subtitle: Job Title

  • Badge: Department abbreviation

  • Additional Info: Office location or phone number

Example 3: Support Tickets List

  • Title: Ticket Subject

  • Subtitle: Assigned To

  • Badge: Status (Open, In Progress, Closed) with colors

  • Additional Info: Created Date

Best Practices

  • Ensure your SQL returns clean, concise data to fit the compact layout.

  • Use badges sparingly to avoid clutter and highlight truly important statuses.

  • Use meaningful titles and subtitles to maximize quick scanning by users.

  • Apply consistent color schemes for badges to convey status or priority clearly.

  • Combine the Contextual Info report with links to detailed pages for full information.

  • Test on different screen sizes to ensure readability and responsiveness.

This report template is useful for displaying key value pairs.

Options:

Hide Empty Values


Display Items Inline(default)

Display Items - Stacked

Display Labels – Inline (default)

Display Labels - Stacked

Pagination 

Displayed, or Hidden when all rows displayed




Oracle APEX Documentation

For additional details and examples, visit the official Oracle APEX documentation:
https://docs.oracle.com/en/database/oracle/apex/
Search for "Contextual Info" or "Report Templates" for the most relevant guides.

Conclusion

The Contextual Info report template in Oracle APEX is a practical and visually effective way to display lists of records with associated details and statuses. By mapping your data correctly and using badges and formatting thoughtfully, you can build reports that are easy to read and navigate. This enhances user experience and allows users to get key information at a glance, making it a valuable component for dashboards, directories, and summary pages in your Oracle APEX applications.

No comments:

Post a Comment

How Do I Make a Faceted Search Map Page in Oracle APEX

Combining faceted search with a map region in Oracle APEX enables users to filter data visually and spatially at the same time. This design ...