Search This Blog

Monday, June 30, 2025

High Performance Compared to Interactive Reports

 High Performance Compared to Interactive Reports

In Oracle APEX, Classic Reports are often favored for their high performance, especially when compared to Interactive Reports. The performance differences stem primarily from the architectural design and feature set of these two report types.

Classic Reports load faster than Interactive Reports because they do not include additional processing like filtering, sorting, or column reordering. If your application needs read-only, high-performance reporting, Classic Reports are a great choice.

They are ideal for scenarios where:

  • Users do not need to apply complex filters

  • The data is primarily read-only

There is a need to display large datasets efficiently

Classic Reports are designed to be lightweight and straightforward. When a Classic Report is executed, Oracle APEX simply runs the SQL query and renders the results as a static HTML table. This minimal processing means the report loads quickly, with very low server and client resource usage. Because Classic Reports do not include advanced features like on-the-fly filtering, sorting, or aggregation, there is less overhead in both query execution and page rendering. This makes Classic Reports ideal for displaying large datasets or when performance is a critical factor.

In contrast, Interactive Reports offer rich functionality, including dynamic filtering, sorting, highlighting, exporting, and personalized views. To provide these features, Interactive Reports perform additional processing both on the server and client sides. They rely on complex JavaScript and AJAX calls to manage user interactions dynamically. This complexity can result in longer load times and higher CPU and memory consumption, especially when handling large volumes of data or when multiple users are accessing the application simultaneously.

The trade-off between Classic Reports and Interactive Reports is essentially one of performance versus interactivity. Classic Reports deliver faster response times and reduced resource consumption, making them suitable for scenarios where speed and simplicity are priorities. Interactive Reports, while more resource-intensive, provide a superior user experience through extensive data manipulation capabilities.

In summary, if your application requires quick loading times and efficient use of resources, particularly for large datasets, Classic Reports are the preferred choice due to their high performance. However, when user-driven data exploration and customization are needed, Interactive Reports offer powerful tools at the cost of additional processing overhead. Understanding these differences helps developers make informed decisions to balance user experience and application performance in Oracle APEX projects.

Importance of Classic Reports in Oracle APEX

 Classic Reports in Oracle APEX play a fundamental role in application development by providing a straightforward and flexible way to display tabular data from the database. They are one of the oldest and most widely used report types in APEX, offering developers a familiar and reliable tool to present information clearly and efficiently.

Detailed Importance of Classic Reports in Oracle APEX:

  1. Simplicity and Ease of Use
    Classic Reports are simple to create and configure. Developers can quickly write SQL queries that fetch the desired data, and APEX automatically formats and displays the results in a clean, tabular layout. This ease makes Classic Reports ideal for quick data review and basic reporting needs.

  2. Flexibility in SQL Querying
    Since Classic Reports rely on SQL queries, developers have full control over the data retrieval process. They can use complex SQL statements, joins, filters, aggregations, and even PL/SQL functions within the query to tailor the report’s content precisely to business requirements.

  3. Customizable Presentation
    Classic Reports support a wide range of customization options. Developers can define column headings, formatting (such as number and date formats), conditional highlighting, and add HTML or dynamic actions to enhance the user interface. This allows reports to be both informative and visually appealing.

  4. Integration with APEX Components
    Classic Reports easily integrate with other APEX features like Interactive Grids, Interactive Reports, and dynamic actions. They can include links, buttons, and item values that interact with other page elements, enabling seamless navigation and data manipulation within the application.

  5. Performance Efficiency
    Classic Reports are generally lightweight and fast, making them suitable for scenarios where performance is critical. They fetch and render only the data specified in the SQL query without additional overhead, ensuring quick load times especially with optimized SQL.

  6. Control Over Pagination and Sorting
    Classic Reports provide built-in support for pagination and column sorting, which improves usability when dealing with large datasets. Users can navigate through pages of data or reorder the data by clicking column headers, enhancing the report’s interactivity.

  7. Support for Export and Printing
    Classic Reports can be easily exported to formats like CSV, PDF, and Excel. This feature is important for business processes that require offline analysis, sharing, or record-keeping. Printing-friendly templates also ensure reports can be physically distributed when needed.

  8. Backward Compatibility and Stability
    As a mature component of Oracle APEX, Classic Reports maintain strong backward compatibility. Applications developed with older APEX versions continue to work seamlessly, which is crucial for long-term application maintenance and gradual upgrades.

  9. Foundation for Advanced Reporting
    While Interactive Reports and Interactive Grids offer more advanced features, Classic Reports often serve as the foundation or fallback option. They provide a predictable, stable reporting mechanism that developers can extend with custom PL/SQL or JavaScript as needed.

Classic Reports are a cornerstone feature in Oracle APEX, offering developers a reliable and straightforward method to display data in tabular form. Their importance lies in their ability to provide a simple yet powerful reporting solution that balances ease of use with extensive customization options. For many applications, Classic Reports serve as the go-to component for presenting database information clearly and efficiently without the complexity of more advanced reporting tools.

Classic Reports are one of the most fundamental and widely used components in Oracle APEX. They allow developers to display structured data from a database in a tabular format. Unlike Interactive Reports or Interactive Grids, Classic Reports provide a simpler, highly customizable, and performance-efficient way to present information without the overhead of complex features.

Simplicity and Ease of Use

Classic Reports are easy to create and configure, making them ideal for quickly displaying data. They are generated based on a SQL query and do not require complex configurations. Developers can simply define a SQL query, and APEX automatically formats the results into an HTML table.

For example, a simple Classic Report query:

SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, DEPARTMENT_ID 

FROM EMPLOYEES;

This will generate a structured, readable output with columns EMPLOYEE_ID, FIRST_NAME, LAST_NAME, and DEPARTMENT_ID.

Classic Reports remain essential in Oracle APEX development due to their simplicity, flexibility, and performance. They enable rapid data presentation with minimal configuration while allowing developers to tailor reports to specific business needs. Whether for quick data review or as part of a larger application, Classic Reports continue to be a valuable tool for delivering consistent and user-friendly data views.

In summary, Classic Reports are essential in Oracle APEX because they combine simplicity, power, and flexibility. They allow developers to rapidly create efficient, customized data displays that meet a wide variety of business needs, ensuring both performance and user satisfaction. Their enduring presence in APEX reflects their reliability and importance in everyday application development.

Creating a master detail – Detail single record form layout

 Creating a master-detail layout in Oracle APEX is a powerful way to display related data in a clear and organized manner. This approach allows users to view a master record alongside its detailed records, enhancing usability and data navigation. When using a detail single record form layout, each detail record can be viewed or edited individually, providing a focused interface for data entry or review. Master-detail layouts are commonly used in applications such as order management, where an order (master) has multiple line items (details).

Master-detail single record form layouts improve user experience by keeping the data context visible and accessible, while simplifying interaction with each detail record. In Oracle APEX, you can create this layout by defining a master region and linking it with a detail region configured as a single record form. This setup supports CRUD operations on both master and detail records, ensuring data integrity and ease of maintenance.

Creating a master-detail layout with a detail single record form in Oracle APEX involves setting up two linked regions: one to display the master data and another to manage detail records one at a time. This layout is especially useful when you want users to view or edit a single detail record related to a selected master record, providing a clear and focused interface.

Here is a detailed step-by-step guide on how to create a master-detail page with a detail single record form layout in Oracle APEX:

  1. Prepare Your Tables and Relationships
    Ensure you have two tables with a parent-child relationship. For example, a MASTER table (e.g., ORDERS) and a DETAIL table (e.g., ORDER_ITEMS), where ORDER_ITEMS has a foreign key referencing ORDERS.

  2. Create a New Page
    In Application Builder, create a new page and select the Master-Detail page type. Oracle APEX provides a wizard to simplify this process.

  3. Select Master and Detail Tables
    In the wizard, select your master table first (ORDERS), then select your detail table (ORDER_ITEMS). The wizard will detect the foreign key relationship automatically.

  4. Choose Layout Options
    When prompted for the detail region layout, select Form - Single Record for the detail region. This means the detail region will display one detail record at a time, allowing easy editing and review.

  5. Configure Master Region
    The master region typically is a report or interactive grid showing all master records. It allows users to select the master record they want to work with.

  6. Configure Detail Single Record Form
    The detail form will show fields for a single detail record linked to the selected master. The form automatically filters detail records based on the master record’s primary key.

  7. Link Master and Detail Regions
    The wizard will create a master-detail link by setting a page item with the master record’s primary key. This link ensures that when a master record is selected, only the related detail records appear.

  8. Set Navigation Buttons
    The detail form should have navigation buttons such as Next, Previous, Create, Delete, and Save. These allow users to move through the detail records one at a time, create new detail entries, or delete existing ones.

  9. Adjust Page Items and Validations
    Customize the form fields, set validations, and apply any formatting or UI Defaults as needed for your application’s requirements.

  10. Test the Page
    Run the page in your application to verify the master-detail behavior. Selecting a master record should refresh the detail form to show the corresponding detail records, allowing individual editing.

This approach provides a clean and user-friendly interface for managing parent-child data, making it easier to maintain data integrity and improve usability. The single record detail form focuses user attention on one detail at a time, reducing errors and simplifying data entry tasks.

By leveraging Oracle APEX’s built-in master-detail wizards and form regions, you can quickly build sophisticated layouts that meet complex business needs without extensive manual coding.

Example

Creating a Master-Detail Report in Oracle APEX

A Master-Detail Report in Oracle APEX allows users to view related sets of data on the same page. The master section displays a high-level overview, while the detail section provides specific records related to the selected master record. This type of report is useful for applications that need to show hierarchical or relational data, such as customers and their orders, departments and employees, or projects and tasks.

This tutorial explains how to create a Master-Detail Report in APEX using an Interactive Report for the master data and an Interactive Grid for the detail data.

Understanding Master-Detail Relationships

A Master-Detail relationship exists when one record in a master table corresponds to multiple related records in a detail table.

For example, in an HR application:

  • The Master table is "Departments," displaying a list of departments.

  • The Detail table is "Employees," showing employees working in the selected department.

The two tables are related by a foreign key, where the "Employees" table has a column referencing the "Department ID" from the "Departments" table.

Steps to Create a Master-Detail Report

Step 1: Prepare the Database Tables

Ensure that the database contains two related tables. Below is an example of a simple master-detail relationship:

CREATE TABLE DEPARTMENTS (

    DEPT_ID NUMBER PRIMARY KEY,

    DEPT_NAME VARCHAR2(100)

);


CREATE TABLE EMPLOYEES (

    EMP_ID NUMBER PRIMARY KEY,

    EMP_NAME VARCHAR2(100),

    DEPT_ID NUMBER REFERENCES DEPARTMENTS(DEPT_ID)

);


Step 2: Create a New Page in APEX

  1. Open Oracle APEX and navigate to your application.

  2. Click on CreatePage.

  3. Select Master-Detail as the page type.

  4. Choose the Master table (Departments) and the Detail table (Employees).

  5. Click Next, provide a page name, and finish the setup.

Step 3: Configure the Master Report

  1. APEX will generate an Interactive Report for the Master section (Departments).

  2. This report should display key department information like Department ID and Department Name.

  3. Ensure the Department ID column is selected as a primary key.

  4. The report should allow users to select a department to view related employees.

Step 4: Configure the Detail Report

  1. The Detail section will be created as an Interactive Grid, linked to the selected Department ID.

  2. APEX automatically sets up the grid to filter employees based on the selected department.

  3. Ensure that Department ID is passed as a parameter to the detail grid.

  4. The grid should include relevant fields such as Employee ID, Employee Name, and Department ID.

Step 5: Implement the Filtering Mechanism

To ensure that selecting a department updates the employee list dynamically:

  1. Open the Master Report (Departments Interactive Report).

  2. Add a Dynamic Action that triggers when a row is selected.

  3. Choose Set Value and set the value of PXX_DEPT_ID (where XX is your page number) to the selected DEPT_ID.

  4. Add another action to refresh the Employee Interactive Grid so that it updates when a department is selected.

Step 6: Test and Enhance the Report

  1. Run the page and verify that selecting a department updates the list of employees.

  2. Add additional formatting such as: 

    • Highlighting rows in the detail grid for active employees.

    • Adding a search bar in the master report to quickly find a department.

    • Allowing inline editing in the detail grid to update employee records directly.

Additional Enhancements

  • Sorting and Filtering: Enable users to sort or filter records in both sections.

  • Styling with CSS: Use CSS to style the master-detail relationship, making it visually appealing.

  • Custom JavaScript: Enhance interactivity by adding animations or auto-refresh options.


Best Use Cases for Master-Detail Reports

  • Customer and Orders: View customer details in the master report and related orders in the detail section.

  • Projects and Tasks: Manage projects with tasks listed in a related detail grid.

  • Departments and Employees: Assign employees to departments and view them dynamically.

A Master-Detail Report in APEX improves data visualization by allowing users to navigate hierarchical relationships efficiently. Using an Interactive Report for the master section and an Interactive Grid for the detail section provides a user-friendly interface that supports real-time data updates, filtering, and inline editing.

EXAMPLES:

There are two ways of doing this…

The Easy Way – Using a Classic Report

Step 1- Create a Master- Detail page AND in the detail page, there will likely be TWO Classic Reports

 Report 1 – Is likely to have only a few fields

 Report 2 – Is likely to have many more fields

Step 2- Take the first report

  • Duplicate the report

  • In regions> layout Set the following settings

A screenshot of a computer

Description automatically generated

In the Attributes >  Appearance do the following:

A screenshot of a computer

AI-generated content may be incorrect.

That will give you something like this:

A screenshot of a mail

Description automatically generated

Add additional columns as needed.

The slightly harder way – Using Forms

In Forms there is a pre-rendering process that actually performs the query. That is, out of the box, a form expects to have the PK for the form source when the whole page is loaded - Not after you click something and expect the form to become refreshed. That is, forms are page loaded, not dynamically refreshed like reports.

Step 1 – Drag a Form into the page

A screenshot of a computer

Description automatically generated

Step 2 - Create a Dynamic Action in the “Page Load”

A screenshot of a computer

AI-generated content may be incorrect.

Step 3 – In the Actions of the True side of the Page Load enter the following.

A screenshot of a computer

Description automatically generated

We are using the following code

select CUSTOMER_ID,

       FULL_NAME,

       EMAIL_ADDRESS

  from CUSTOMERS

 where "CUSTOMER_ID" = :P67_CUSTOMER_ID

Notice how the values match the fields

A screenshot of a computer

Description automatically generated

Step 4 – In the form > Region >Sourceset the following

A screenshot of a computer

Description automatically generated

Step 4  - Form > Attributes Disable the Edit

A black rectangular object with white text

Description automatically generated

Step 5 – For each column of the form do the following;

Customers is the table, Email_Address is the column, and :P67_CUSTOMER_ID is the value passed from the master to the detail

select 1 from "CUSTOMERS"

where "EMAIL_ADDRESS" is not null

and "CUSTOMER_ID" = :P67_CUSTOMER_ID

Now it should look something like this

A screenshot of a contact form

Description automatically generated

By implementing a master-detail single record form layout, developers can deliver an intuitive interface that streamlines workflows and increases productivity. This approach helps users focus on one detail record at a time while always maintaining the connection to the master data, creating a seamless and efficient user experience.

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 ...