Oracle 26.2 Interactive report features
AI Interactive Reports
Interactive Reports are one of the most useful report components in Oracle APEX. In this example, I created an employee report and enabled Natural Language Support so users can work with the report using simple questions.
Introduction
Interactive Reports make it easy to work with application data without creating separate pages for every report requirement. Users can search, filter, sort, group and change the way the data is displayed.
In this blog, I created a simple Employee Analytics page and connected it to an Interactive Report. I then enabled Natural Language Support and tested different requests using normal sentences.
Interactive Report
A flexible report where users can search, filter, sort and organize data.
Natural Language
Users can describe what they want instead of manually creating every filter.
Employee Data
The demo uses employee information such as department, status, salary and location.
What We Are Building
The example contains an Employee Analytics page with an Interactive Report. The report is based on an employee table and contains information that can be filtered and analyzed.
The main idea is simple. Instead of manually opening the report actions and creating every filter, the user can describe the required result using a normal sentence.
Step 1: Create the Employee Table
First, create a table that will be used as the data source for the Interactive Report.
CREATE TABLE APEX_IR_AI_EMPLOYEES (
EMP_ID NUMBER GENERATED BY DEFAULT AS IDENTITY,
EMPLOYEE_NAME VARCHAR2(100),
DEPARTMENT VARCHAR2(50),
JOB_TITLE VARCHAR2(100),
STATUS VARCHAR2(20),
SALARY NUMBER(10,2),
JOIN_DATE DATE,
LOCATION VARCHAR2(50),
EMAIL VARCHAR2(150),
CONSTRAINT APEX_IR_AI_EMP_PK PRIMARY KEY (EMP_ID)
);
Step 2: Add Sample Data
I inserted a few employee records with different departments, statuses, salaries and locations. This gives us enough data to test the report.
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('John Smith', 'IT', 'Senior Developer', 'Active',
85000, DATE '2022-01-15', 'Chennai', 'john.smith@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('David Miller', 'IT', 'IT Manager', 'Active',
120000, DATE '2019-06-10', 'Bangalore', 'david.miller@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Sarah Wilson', 'HR', 'HR Executive', 'Active',
65000, DATE '2023-03-20', 'Chennai', 'sarah.wilson@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Michael Brown', 'Finance', 'Financial Analyst', 'Active',
78000, DATE '2021-08-12', 'Mumbai', 'michael.brown@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Emily Davis', 'IT', 'Developer', 'Inactive',
72000, DATE '2020-11-05', 'Chennai', 'emily.davis@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Robert Taylor', 'Sales', 'Sales Manager', 'Active',
95000, DATE '2018-04-18', 'Delhi', 'robert.taylor@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Jennifer Anderson', 'Finance', 'Accountant', 'Active',
68000, DATE '2022-09-01', 'Chennai', 'jennifer.anderson@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('William Thomas', 'IT', 'Architect', 'Active',
135000, DATE '2017-02-14', 'Bangalore', 'william.thomas@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Jessica Moore', 'HR', 'HR Manager', 'Active',
90000, DATE '2019-12-02', 'Hyderabad', 'jessica.moore@example.com');
INSERT INTO APEX_IR_AI_EMPLOYEES
(EMPLOYEE_NAME, DEPARTMENT, JOB_TITLE, STATUS, SALARY, JOIN_DATE, LOCATION, EMAIL)
VALUES
('Daniel Martin', 'Sales', 'Sales Executive', 'Inactive',
55000, DATE '2023-05-22', 'Pune', 'daniel.martin@example.com');
COMMIT;
Step 3: Create the Interactive Report
Open App Builder
Open the APEX application and select Create Page.
Select Interactive Report
Select Interactive Report as the page type.
Select the Table
Choose Local Database, Table and APEX_IR_AI_EMPLOYEES.
| Setting | Value |
|---|---|
| Page Number | 20 |
| Page Name | Employee Analytics |
| Page Mode | Normal |
| Data Source | Local Database |
| Source Type | Table |
| Table | APEX_IR_AI_EMPLOYEES |
After creating the page, run it and check that the employee records are displayed correctly.
Step 4: Explore the Interactive Report
Before adding the AI functionality, I tested the normal Interactive Report options. These options are useful when users want to work directly with the report.
Search
Search for employee records using the report search area.
Filter
Filter records based on department, status or another column.
Sort
Sort employees by salary, join date or another column.
Group
Organize the report using grouping and control break options.
Chart
Create a visual representation of the report data.
Download
Use the report actions to work with the displayed data.
Step 5: Enable Natural Language Support
Now open the Employee Analytics page in Page Designer and select the Interactive Report region.
Step 6: Add Report Context
Report Context helps the AI understand what the report is about and what the important columns represent.
This Interactive Report displays employee information.
The report contains employee ID, employee name, department,
job title, employment status, salary, join date, location,
and email address.
DEPARTMENT represents the department in which the employee works.
STATUS indicates whether the employee is currently Active or Inactive.
SALARY represents the employee's annual salary.
JOIN_DATE represents the date on which the employee joined the organization.
LOCATION represents the employee's work location.
The report is used to analyze employee information. Users may
filter, sort, group, highlight, aggregate, and create charts
based on the report data.
It gives the AI additional information about the purpose of the report and the meaning of the columns. This makes natural language requests easier to understand.
Step 7: Test Natural Language Requests
After saving the page, I tested the AI search with different requests. These examples show how a normal sentence can be used to work with the report.
Step 8: Use Multiple Instructions
We can also give more than one instruction in a single request. For example:
Show active employees from the IT department,
sort them by salary from highest to lowest,
and highlight employees whose salary is greater than 100000.
This is useful when a user wants to apply several report changes at the same time.
Step 9: AI Assistant
The AI Assistant provides another way to continue working with the report. Users can start with one request and then refine the result with additional requests.
This gives users a simple way to continue refining the report without manually changing every report option.
What I Learned
Easy Report Changes
Users can describe the required report result using simple sentences.
Less Manual Work
Users do not always need to manually create filters and other report settings.
Better User Experience
Natural language can make report features easier to discover and use.
The combination of Interactive Reports and Natural Language Support gives users another simple way to work with report data. Instead of learning every report option first, they can describe what they want and see how the report changes.
Final Page Configuration
| Component | Configuration |
|---|---|
| Page | Employee Analytics |
| Report Type | Interactive Report |
| Data Source | APEX_IR_AI_EMPLOYEES |
| Natural Language Support | Enabled |
| Default Search Mode | Search with AI |
| Report Context | Employee report description |
Try the Live Demo
I created a working Employee Analytics page to demonstrate the Interactive Report and Natural Language Support.
Live Demo ↗Oracle APEX Interactive Report and AI demonstration
Comments
Post a Comment