AOP Modal
Overview
The AOP Modal makes it even easier to download and schedule reports. The AOP Modal gives power to the end-users and allows them to download a Classic Report, Interactive Report, and Interactive Grid in the format and look and feel they want. Easily add a logo and additional text to a template to get the customized output you’ve been waiting for.

Features at Glance
Export an APEX report in different formats
AOP Modal can export reports in the following formats: PDF, Excel (xlsx), Word (docx), HTML, CSV, PowerPoint (pptx), Open Document Text (ODT), Open Document Spreadsheet (ODS), Open Document Presentation (ODP) and Markdown.
Replace the native APEX printing with AOP printing
By checking the checkbox, the native APEX report download and schedule functionality will be replaced by the more powerful AOP Modal.
Classic Report, Interactive Report, and Interactive Grid with pixel-perfect templates
AOP Modal allows the end-user to select a template of their choice without the need for a developer to be involved.
Run in the background
Long-running reports can be easily run in the background, so the end-user doesn’t have to wait for the result.
Schedule
The AOP Modal allows you to schedule reports minutely, hourly, daily, and weekly.
Translatable
AOP Modal components and messages can be easily translated using APEX Text Messages.
Send emails
The AOP Modal can send emails. Bigger reports will be sent as a link with which the recipient can download the file.
Output to the filesystem
The AOP Modal allows you to output the file to a database directory or to the AOP server output directory.
Custom output location
AOP Modal supports the creation of custom post document generation PL/SQL callbacks to handle your reports.
Multiple region sources
AOP Modal can generate a report based on multiple regions in the same document.
Automatic file generation
The AOP Modal can be configured to generate a report without any additional action from the end-user.
Show the download progress
The AOP Modal seamlessly integrates with the Plug-ins Pro Progress Bar to give the end-user an indication of how much longer the generation of the report will take.
Detailed explanation of the attributes
Action
The Action attribute determines what the AOP Modal plug-in will do when a dynamic action is triggered in your APEX application. It specifies the workflow step or operation that should be performed, such as initializing the plug-in, adding output options, or downloading a generated file.
When to use:
You should set the Action attribute based on the desired behavior you want to implement in your dynamic action. For example, use "Initialize" to set up the plug-in, "Add a new Output To tile" to provide custom output destinations, or "Download File" to retrieve a file after background processing.
Available options:
-
Initialize
Initializes the plug-in using the provided settings, report type, template selection, output destinations, timing, default template, SQL queries for templates, and any initialization PL/SQL code.
A dynamic action implementing the plug-in should always implement this action.
Use this as the first step in your dynamic action to prepare the plug-in for further actions. -
Add a new "Output To" tile
Adds a custom tile to the Output To item, allowing users to select a new output destination. The tile’s text and icon are defined by the corresponding attributes, and the Procedure Name attribute specifies how to handle the generated file.
Use this to offer additional or custom output locations for generated reports. -
Add an Additional Region Source
Includes another region (Classic Report, Interactive Report, or Interactive Grid) as a data source for the AOP template.
Use this when you want your report to be based on multiple regions within the same document. -
Download File (Background)
Downloads a file that was generated by a background job, referenced bythis.data.jobNamein the dynamic action event data.
Use this to allow users to download a report after it has been generated asynchronously in the background. The job must be finished before this action can be called.
Settings
The Settings attribute controls various functionalities and behaviors of the AOP Modal plug-in. By configuring these options, you can customize how the plug-in interacts with users and handles report generation, messaging, logging, and integration with native APEX features.
When to use:
Adjust the Settings attribute to enable or disable specific plug-in features according to your application's requirements and user experience goals.
Available options:
-
Add AOP JSON in debug mode
When enabled, the plug-in adds AOP JSON as an extra choice in the Report Type select list inside the dialog whenever APEX debug mode is active, on top of the formats you configured. The end-user (or developer) still has to pick AOP JSON from the dropdown and click Go to actually download the JSON. It does not change the default or auto-replace another format.
Use this for troubleshooting or inspecting the generated JSON during development. See Generate the AOP JSON for Debugging for the full walkthrough. -
Display Message
When enabled, the plug-in shows a success message after report generation, based on the selected Output To and When values. Messages can be customized using APEX text messages and plug-in substitution strings.
Use this to provide feedback to users after a report is generated. -
Display Spinner
When enabled, an APEX spinner is shown while the report is being generated, indicating progress to the user.
Use this to improve user experience during longer report generation processes. -
Enable Save Log
When enabled, AOP logging is activated for this plug-in instance, overriding the application-level logging setting. If not enabled, the application-level setting is used.
Use this to capture detailed logs for troubleshooting or auditing. -
Hide Native APEX Print
When enabled, the plug-in removes native print functionalities from Classic Report, Interactive Report, and Interactive Grid regions:- Classic Report: Removes the native Print anchor from the report footer.
- Interactive Report: Hides the Download and Subscription entries in the Actions menu.
- Interactive Grid: Hides the Download entry in the Actions menu.
Use this to ensure users only use AOP Modal for report downloads and avoid confusion with native APEX print options.
Report Type
The Report Type attribute defines the formats in which reports can be generated and downloaded by the end-user using the AOP Modal. This determines the output format of the report, such as PDF, Excel, Word, and others.
When to use:
Configure the Report Type attribute to specify which formats should be available to users. If only one report type is selected, the Report Type selection will not be shown in the plug-in dialog—the selected format will be used by default.
Available options:
-
PDF
Generates the report as a PDF document. -
Excel
Exports the report in xlsx format. -
Word
Exports the report in docx format. -
HTML
Generates the report as an HTML file. -
CSV
Exports the report as a comma-separated values (CSV) file. -
PowerPoint
Generates the report in pptx format. -
Open Document Text
Exports the report in Open Document Text (ODT) format. -
Open Document Spreadsheet
Exports the report in Open Document Spreadsheet (ODS) format. -
Open Document Presentation
Generates the report as an Open Document Presentation (ODP) file. -
Markdown
Exports the report in Markdown format. -
AOP Template
Generates an AOP template based on the selected region source. -
AOP JSON
Returns the JSON payload that the plug-in would send to the AOP Server, as a downloadable file. The AOP Server is not contacted and no document is generated. Useful for debugging and support.
Note: even when you do not tick AOP JSON here, it is still added to the Report Type select list inside the dialog at runtime if the Add AOP JSON in debug mode setting is on AND APEX debug mode is active. See Generate the AOP JSON for Debugging.
Output To
The Output To attribute defines what happens with a generated report. It specifies the destination or delivery method for the report, such as downloading to the browser, saving to a table, sending via e-mail, or storing on the filesystem.
Note:
For each output type, you will see options like Now, Background, and Scheduled. These refer to the timing of report generation, which is controlled by the When attribute (explained in the next section). The combination of Output To and When determines both where and when the report is delivered.
When to use:
Configure the Output To attribute to control how and where users can access the generated reports. If only one value is selected, the Output To dialog item is not shown—the selected option is used by default.
Available options:
-
Browser
- Now: The report is generated immediately and transferred to the browser for the user to download.
- Background: The report is generated in the background using a job.
-
Table
- Now: The report is generated and inserted into the
AOP_DOWNSUBSCR_OUTPUTtable. - Background: The report is generated in the background and inserted into the
AOP_DOWNSUBSCR_OUTPUTtable. - Scheduled: The report is generated using a database scheduler job and inserted into the
AOP_DOWNSUBSCR_OUTPUTtable.
- Now: The report is generated and inserted into the
-
E-mail
The sender’s e-mail address is set using the E-mail From component attribute.- Now: The report is generated and sent as an e-mail attachment.
- Background: The report is generated in the background and sent as an e-mail attachment.
- Scheduled: The report is generated using a scheduler job and sent as an e-mail attachment.
-
Filesystem (DB Directory)
- Now: The report is generated and saved in the
AOP_DOWNSUBSCR_DIRdatabase directory. - Background: The report is generated in the background and saved in the
AOP_DOWNSUBSCR_DIRdatabase directory. - Scheduled: The report is generated using a scheduler job and saved in the
AOP_DOWNSUBSCR_DIRdatabase directory.
- Now: The report is generated and saved in the
You can create the database directory with the following command:
CREATE DIRECTORY AOP_DOWNSUBSCR_DIR AS '/home/oracle/aop/';
-
Filesystem (AOP Directory)
- Now: The report is generated and saved in the specified directory on the AOP Server (
outputfiles). - Background: The report is generated in the background and saved in the specified directory on the AOP Server.
- Scheduled: The report is generated using a scheduler job and saved in the specified directory on the AOP Server.
- Now: The report is generated and saved in the specified directory on the AOP Server (
-
APEX Office Edit (AOE)
Allows users to view and edit the generated document directly in the AOE region, supporting Word, Excel, PowerPoint, OpenDocument, Text, and PDF formats. -
Custom
Use the "Add a new Output To tile" action to specify a custom output type.
Note: Custom output locations can be added regardless of this option. If only one custom output is provided, the Output To selection is hidden and the single option is used by default.
Choose the Output To options that best fit your application's requirements and how you want users to access or receive their reports.
When
The When attribute defines the timing of report generation. It controls whether a report is generated immediately, scheduled for a specific time or interval, or processed in the background.
When to use:
Configure the When attribute to match your application's workflow and user expectations. If only one value is selected, the When dialog item will not be visible to the end-user—the selected option will be used by default.
Available options:
-
Now
File generation starts immediately, and the end-user waits for the result. After the file is generated, the plug-in triggers theAOP: Report Generated (Now)event. -
Scheduled
A file is generated at a specific time as defined by the end-user’s selection. Scheduling options include:- Starts (Now/On specific date)
- Start Date
- Repeat Every
- Frequency (Minute/Hour/Day/Week/Month/Year)
- Days of the week (Mon/Tue/Wed/Thu/Fri/Sat/Sun)
After the plug-in processes the request to create a new scheduled report, theAOP: Report Generation Scheduledevent is triggered.
-
Background
File generation starts immediately, but the end-user is not forced to wait for the document to finish. After the plug-in processes the request to create a new job, theAOP: Report Generating in the Backgroundevent is triggered.
Choose the When option that best fits how and when you want reports to be generated in your application.
Template Selection
The Template Selection attribute determines which template will be used to generate the report. The available templates depend on the selected report type, and the list of templates is dynamically fetched (via AJAX) when the report type changes. If only one template is available, the Template Selection dialog item is hidden and that template is used by default.
When to use:
Configure the Template Selection attribute to allow users to choose from different templates for their report output. This is useful when you want to offer multiple layouts, branding, or formatting options for the same report data.
Available options:
-
AOP Report
The default template used by AOP. The report is generated based on the print attributes of the region and any global variables set using the Initialize PL/SQL Code attribute.
Example: To set the background color of the heading, useaop_api_pkg.g_rpt_header_back_color := '#FF0000'; -
APEX Report
Uses the default template provided by APEX. The report is generated using APEX’s built-in functionality.
Note: Supported only from APEX 20.2 onwards. -
APEX Report (Data Only)
Generates a report containing only the data, with all visual enhancements (such as highlighting and grouping) removed. -
Template from AOP Table
Allows the developer to specify a SQL query that returns templates for the end-user to pick from. -
Template from SQL Query
Templates are fetched from the supporting application tablesAOP_DOWNSUBSCR_TEMPLATEandAOP_DOWNSUBSCR_TEMPLATE_APP. The SQL query itself cannot be changed, but developers can add or modify templates using the supporting application.
Choose the template selection option that best fits your reporting requirements and the flexibility you want to provide to your users.
Default Template
The Default Template attribute specifies which template will be preselected for report generation when the AOP Modal dialog is shown. This determines the initial template choice presented to the user, streamlining the process if a particular template is most commonly used.
When to use:
Set the Default Template attribute to automatically select a preferred template for users. This is useful when you want to guide users toward a standard layout or branding, or when only one template is typically used for a report.
Available options:
-
AOP Report
The AOP Report template is selected by default in the "Choose your template" dialog. -
APEX Report
The APEX Report template is selected by default in the "Choose your template" dialog. -
APEX Report (Data Only)
The APEX Report (Data Only) template is selected by default in the "Choose your template" dialog. -
Based on the default template column
The default template is selected from the templates returned by the query defined in Templates (SQL Query), based on thetemplate_defaultcolumn.
Choose the default template option that best matches your application's requirements and the experience you want to provide to your users.
Initialize PL/SQL Code
The Initialize PL/SQL Code attribute allows you to define PL/SQL variables and logic that AOP will use when generating a file. This is where you can set global variables, customize output filenames, adjust formatting, or include additional files in the report generation process.
When to use:
Use this attribute when you need to set or override AOP global variables, dynamically control report output, or inject custom logic before report generation. It is especially useful for advanced customization and automation scenarios.
Examples:
aop_api_pkg.g_output_filename := 'output';
aop_api_pkg.g_output_filename := v('P1_FILENAME');
aop_api_pkg.g_rpt_header_font_size := '12';
aop_api_pkg.g_prepend_files_sql := q'[select filename, mime_type, template_blob as file_blob from aop_template where filename like 'PREPEND%' order by filename]';
aop_api_pkg.g_append_files_sql := q'[select filename, mime_type, template_blob as file_blob from aop_template where filename like 'APPEND%' order by filename]';
Additional Information:
- Type: PL/SQL Code
- Supported Bind Variables: Application, Page Items, and System Variables
- For a complete list of available variables and usage, refer to the AOP PL/SQL API documentation.
Page Item to Submit
The Page Item to Submit attribute specifies a list of page items whose values should be sent along with the AJAX call when generating a report. This ensures that the most current values of these items are available to the server-side process.
When to use:
Use this attribute when your report generation depends on the values of specific page items, such as filters or user input fields. By submitting these items, you ensure the report reflects the latest user selections.
Additional Information:
- Type: Item (separate multiple values with a comma, e.g.
P1_ITEM1,P1_ITEM2) - By default, the plug-in fetches the page item(s) to be sent from the region attribute Source \ Page Items to Submit.
Specify all relevant page items to guarantee accurate and dynamic report output.
Affected Elements
The Affected Elements attribute specifies which page components will be impacted when the dynamic action is executed. This determines the scope of the action, such as which region or elements on the page should be refreshed, updated, or otherwise affected.
When to use:
Use this attribute to target specific regions or elements that should respond to the action triggered by the AOP Modal. This is useful for updating only relevant parts of the page, improving performance and user experience.
Available options:
-
Region
The action affects the region you select. -
jQuery Selector
The action affects the page element(s) returned using the jQuery selector syntax you enter.
Initialization JavaScript Code
The Initialization JavaScript Code attribute allows you to customize the initialization of the AOP Modal plug-in using JavaScript. This code is executed when the plug-in action "Initialize" is triggered, enabling you to override or extend the default options before the plug-in instance is created.
When to use:
Use this attribute when you need to modify plug-in options dynamically, such as changing dialog titles, restricting scheduling options, or applying other custom behaviors at initialization.
Default value:
An anonymous JavaScript function that accepts a single parameter pOptions and returns the modified options object.
function(pOptions) {
return pOptions;
}
Examples:
-
Change dialog title:
function(pOptions) {pOptions.translate.AOP_DOWNLOAD_DIALOG_TITLE = 'A new title';return pOptions;} -
Restrict frequency options:
function(pOptions) {// The default array is ['MINUTELY', 'HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY']// To show only Minute, Hour, and Day:pOptions.frequency = ['MINUTELY', 'HOURLY', 'DAILY'];return pOptions;}
Events
The AOP Modal plug-in triggers several events during the report generation process. You can use these events in your APEX application to perform additional actions, such as showing messages, updating the UI, or handling errors.
Event Overview
| Event Name | When It Occurs | Typical Use |
|---|---|---|
| AOP: Before Generating a Report | Before the report generation AJAX call is made | Prepare UI, show loading indicators |
| AOP: Report Generation | After the AJAX call to start report generation succeeds | Update UI, handle returned data |
| AOP: Report Generation Failed | If the AJAX call to start report generation fails | Show error messages |
| AOP: Report Generated (Now) | When a report is generated immediately ("Now" option) | Access generated file, notify user |
| AOP: Report Generation Scheduled | When a report is scheduled ("Scheduled" option) | Notify user, update schedule status |
| AOP: Report Generating in Background | When a report is started in the background ("Background" option) | Notify user, update background jobs |
How to Use Events
You can create Dynamic Actions in Oracle APEX that respond to these events. For example, you might want to display a custom message when a report is generated or handle errors gracefully.
Example: Show a Success Message
- Create a Dynamic Action.
- Set Event to the desired AOP event (e.g.,
AOP: Report Generated (Now)). - Add a True Action, such as "Show" or "Execute JavaScript Code".
Example: Handle Errors
- Create a Dynamic Action.
- Set Event to
AOP: Report Generation Failed. - Add a True Action to display an error message or log the error.
Event Details
Below are the main events and the data they provide:
AOP: Before Generating a Report
- Internal Name:
aopdownloadexecbefore - When: Before the plug-in starts generating a report.
- Data Available: Information about the dynamic action (
this.data.da).
AOP: Report Generation
- Internal Name:
aopdownloadexecsucces - When: After the AJAX call to start report generation succeeds.
- Data Available: User selections, dynamic action info, and (for "Now" downloads) file content, file name, and MIME type.
AOP: Report Generation Failed
- Internal Name:
aopdownloadexecfailure - When: If the AJAX call to start report generation fails.
- Data Available: User selections, dynamic action info, and error details.
AOP: Report Generated (Now)
- Internal Name:
aopdownloadexecsuccesnow - When: When a report is generated immediately ("Now" option).
- Data Available: File content, file name, MIME type, and subscription ID (if saved to table or email).
AOP: Report Generation Scheduled
- Internal Name:
aopdownloadexecsuccescheduled - When: When a report is scheduled ("Scheduled" option).
- Data Available: Job name, user selections, and dynamic action info.
AOP: Report Generating in the Background
- Internal Name:
aopdownloadexecsuccesbackground - When: When a report is started in the background ("Background" option).
- Data Available: Job name, user selections, and dynamic action info.
Understanding this.data in Event Handlers
When you create a Dynamic Action for any AOP Modal event, the event handler receives a this.data object. This object contains all the information you need to process the event, such as user selections, file details, job names, and more.
Key properties of this.data (not all are present in every event):
| Property | Type | Description | Available In Events |
|---|---|---|---|
in | Object | User selections from the dialog (report type, template, output to, when, email, schedule) | All except aopdownloadexecbefore |
da | Object | Dynamic action info (e.g., ID, name) | All events |
fileContent | String | Base64-encoded file content | Only for "Now" downloads to Browser |
fileName | String | Name of the generated file | Only for "Now" downloads to Browser/Filesystem |
mimeType | String | MIME type of the generated file | Only for "Now" downloads to Browser/Filesystem |
jobName | String | Name of the background or scheduled job | Background/Scheduled events |
subscriptionId | String | ID of the saved report (when output is Table or Email) | "Now" events with Table/Email output |
info | Object | Error details (only present in failure events) | aopdownloadexecfailure |
Full List of this.data.in Attributes
The in property contains the user's selections from the AOP Modal dialog. Typical attributes include:
| Attribute | Description |
|---|---|
reportType | Selected report type (e.g., pdf, xlsx, docx, etc.) |
reportTemplate | Selected template (e.g., AOP_REPORT, APEX_REPORT, etc.) |
dataOutput | Output destination (BROWSER, TABLE, EMAIL, etc.) |
when | When to generate (NOW, SCHEDULED, BACKGROUND) |
emailTo, emailCc, emailBcc | Email addresses (if output is Email) |
emailSubject, emailBody | Email subject/body (if output is Email) |
scheduleStarts, scheduleEnds | Scheduling options (if scheduled) |
scheduleDateStart, scheduleDateEnd | Start/end dates (if scheduled) |
scheduleRepeatEvery, scheduleRepeatScope, scheduleRepeatDays | Repeat options (if scheduled) |
Tip: Always check which properties are available for the event you are handling. Not all properties are present in every event.
Accessing Event Data
In a Dynamic Action's JavaScript code:
// Access file name and content after a "Now" download
var fileName = this.data.fileName;
var fileContent = this.data.fileContent;
// Access job name after scheduling or background generation
var jobName = this.data.jobName;
// Access user selections
var reportType = this.data.in.reportType;
var outputTo = this.data.in.dataOutput;
Summary
- Use AOP Modal events to enhance user experience and automate actions.
- Choose the event that matches your workflow (e.g., before generation, after success, on failure).
- Access event data to get details about the generated report or errors.
Translations
AOP Modal supports translations to help you localize dialog labels, messages, and menu entries for your users. You can manage translations using Oracle APEX Text Messages or override them per plug-in instance using JavaScript.
How Translations Work
- Default Language:
If no translation is provided, the plug-in uses built-in English text. - APEX Text Messages:
Define text messages in APEX under Shared Components > Text Messages to translate labels and messages globally for your application. - Override per Instance:
Use the Initialization JavaScript Code attribute to override any label or message for a specific plug-in instance.
What Can Be Translated
- Dialog item labels (e.g., Report Type, Output To, When)
- Button labels (e.g., Go, Cancel)
- Menu entries (e.g., AOP Download)
- Success and error messages
- Scheduling and email dialog fields
Using APEX Text Messages
To translate a label or message for all users:
- Go to Shared Components > Text Messages in your APEX app.
- Add a new text message with the correct code (see table below).
- Enter your translated text.
There are two main types of translation codes:
- Label Codes: Used for UI elements like dialog labels, button texts, and menu entries.
- Message Codes: Used for dynamic or status messages shown to the user (e.g., after a report is generated).
Examples of Label Translation Codes
| Code | Default Text | Where/When It Appears |
|---|---|---|
| AOP_DOWNLOAD_LABEL_MENU_ENTRY | AOP Download | Menu entry in Interactive/Classic/IG report |
| AOP_DOWNLOAD_LABEL_CR_ANCHOR | Print with AOP | Classic Report footer link |
| AOP_DOWNLOAD_LABEL_BUTTON_GENERATE | Go | "Generate" button in the dialog |
| AOP_DOWNLOAD_LABEL_BUTTON_CANCEL | Cancel | "Cancel" button in the dialog |
| AOP_DOWNLOAD_LABEL_ITEM_REPORT_TYPE | Report Type | Label for report type selection in dialog |
| AOP_DOWNLOAD_LABEL_ITEM_TEMPLATE_SELECTION | Choose your template | Label for template selection in dialog |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO | Output To | Label for output destination selection in dialog |
| AOP_DOWNLOAD_LABEL_ITEM_WHEN | When | Label for "When" selection in dialog |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_STARTS | Starts | Scheduling dialog: "Starts" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_STARTS_NOW | Now | Scheduling dialog: "Now" option |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_STARTS_DATE | On specific date | Scheduling dialog: "On specific date" option |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_ENDS | Ends | Scheduling dialog: "Ends" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_ENDS_NEVER | Never | Scheduling dialog: "Never" option |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_ENDS_DATE | On specific date | Scheduling dialog: "On specific date" option |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_START_DATE | Start Date | Scheduling dialog: "Start Date" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_END_DATE | End Date | Scheduling dialog: "End Date" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_REPEAT | Repeat Every | Scheduling dialog: "Repeat Every" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_SCOPE | Frequency | Scheduling dialog: "Frequency" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAYS | Days of the week: | Scheduling dialog: "Days of the week" label |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_MON | Mon | Scheduling dialog: Monday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_TUE | Tue | Scheduling dialog: Tuesday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_WED | Wed | Scheduling dialog: Wednesday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_THU | Thu | Scheduling dialog: Thursday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_FRI | Fri | Scheduling dialog: Friday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_SAT | Sat | Scheduling dialog: Saturday |
| AOP_DOWNLOAD_LABEL_ITEM_SCHEDULE_DAY_SUN | Sun | Scheduling dialog: Sunday |
| AOP_DOWNLOAD_LABEL_ITEM_EMAIL_TO | E-mail To | Email dialog: "To" field label |
| AOP_DOWNLOAD_LABEL_ITEM_EMAIL_CC | E-mail CC | Email dialog: "CC" field label |
| AOP_DOWNLOAD_LABEL_ITEM_EMAIL_BCC | E-mail BCC | Email dialog: "BCC" field label |
| AOP_DOWNLOAD_LABEL_ITEM_EMAIL_SUBJECT | E-mail Subject | Email dialog: "Subject" field label |
| AOP_DOWNLOAD_LABEL_ITEM_EMAIL_BODY | E-mail Body | Email dialog: "Body" field label |
| AOP_DOWNLOAD_LABEL_ITEM_WHEN_NOW | Now | "When" selection: Now |
| AOP_DOWNLOAD_LABEL_ITEM_WHEN_SCHEDULED | Scheduled | "When" selection: Scheduled |
| AOP_DOWNLOAD_LABEL_ITEM_WHEN_BACKGROUND | Background | "When" selection: Background |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO_BROWSWER | Browser | Output To selection: Browser |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO_TABLE | Table | Output To selection: Table |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO_EMAIL | Output To selection: E-mail | |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO_FILE_DB | Folder | Output To selection: DB Directory |
| AOP_DOWNLOAD_LABEL_ITEM_OUTPUTTO_FILE_AOP | Folder | Output To selection: AOP Directory |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_MINUTELY | Minute | Scheduling: Frequency option |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_HOURLY | Hour | Scheduling: Frequency option |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_DAILY | Day | Scheduling: Frequency option |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_WEEKLY | Week | Scheduling: Frequency option |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_MONTHLY | Month | Scheduling: Frequency option |
| AOP_DOWNLOAD_LABEL_ITEM_FREQUENCY_YEARLY | Year | Scheduling: Frequency option |
| AOP_DOWNLOAD_HELP_ITEM_EMAIL_BODY | Use the #DOWNLOAD_LINK# tag... | Email dialog: Help text for body |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TEMPLATE | Generate template | Template selection dialog |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TPL_DOCX | Word (docx) | Template type selection |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TPL_XLSX | Excel (xlsx) | Template type selection |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TPL_PPTX | Powerpoint (pptx) | Template type selection |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TPL_HTML | HTML | Template type selection |
| AOP_DOWNLOAD_LABEL_ITEM_AOP_TPL_MD | Markdown | Template type selection |
| AOP_DOWNLOAD_DIALOG_TITLE | AOP Download | Dialog title |
How to Use:
- Global: Add a Text Message in APEX with the code as the name and your translation as the value.
- Per Instance: Override in Initialization JavaScript Code:
function(pOptions) {pOptions.translate = {"AOP_DOWNLOAD_LABEL_BUTTON_GENERATE": "Generate Report","AOP_DOWNLOAD_MSG_BROWSER_NOW": "Your file &AOP_FILENAME. is ready!"};return pOptions;}
Message Translation Codes:
Message codes are used for dynamic feedback or status messages in AOP Modal.
Each code below is unique, with a clear description and exactly when it appears.
Use these codes in APEX Text Messages for global translation, or override them per plug-in instance.
| Translation Code | Default Text | When/Where Used |
|---|---|---|
| AOP_DOWNLOAD_MSG_BROWSER_NOW | File &AOP_FILENAME. generated and downloaded. | After immediate download to browser (Output To: Browser, When: Now) |
| AOP_DOWNLOAD_MSG_BROWSER_BACKGROUND | File is being generating in the background. | After starting background generation (Output To: Browser, When: Background) |
| AOP_DOWNLOAD_MSG_BROWSER_SCHEDULED | File has been scheduled. | After scheduling a browser download (Output To: Browser, When: Scheduled) |
| AOP_DOWNLOAD_MSG_TABLE_NOW | File saved to table. | After saving to table (Output To: Table, When: Now) |
| AOP_DOWNLOAD_MSG_TABLE_BACKGROUND | File is being generating in the background. | After starting background generation (Output To: Table, When: Background) |
| AOP_DOWNLOAD_MSG_TABLE_SCHEDULED | File has been scheduled. | After scheduling a table save (Output To: Table, When: Scheduled) |
| AOP_DOWNLOAD_MSG_EMAIL_NOW | File generated and sent to e-mail "&AOP_EMAIL_TO." | After sending as email attachment (Output To: Email, When: Now) |
| AOP_DOWNLOAD_MSG_EMAIL_BACKGROUND | File will be sent to e-mail "&AOP_EMAIL_TO." when generation has completed. | After starting background generation (Output To: Email, When: Background) |
| AOP_DOWNLOAD_MSG_EMAIL_SCHEDULED | File scheduled to be sent to e-mail "&AOP_EMAIL_TO." | After scheduling an email send (Output To: Email, When: Scheduled) |
| AOP_DOWNLOAD_MSG_FILE_DB_NOW | File has been saved to the filesystem (db directory) | After saving to DB directory (Output To: Filesystem (DB Directory), When: Now) |
| AOP_DOWNLOAD_MSG_FILE_DB_BACKGROUND | File is being saved to the filesystem (db directory) in the background | After starting background generation (Output To: Filesystem (DB Directory), When: Background) |
| AOP_DOWNLOAD_MSG_FILE_DB_SCHEDULED | File is scheduled to be saved to the filesystem (db directory) | After scheduling a DB directory save (Output To: Filesystem (DB Directory), When: Scheduled) |
| AOP_DOWNLOAD_MSG_FILE_AOP_NOW | File is saved to the filesystem (AOP directory) | After saving to AOP directory (Output To: Filesystem (AOP Directory), When: Now) |
| AOP_DOWNLOAD_MSG_FILE_AOP_BACKGROUND | File is being saved to the filesystem (AOP directory) in the background | After starting background generation (Output To: Filesystem (AOP Directory), When: Background) |
| AOP_DOWNLOAD_MSG_FILE_AOP_SCHEDULED | File is scheduled to be saved to the filesystem (AOP directory) | After scheduling an AOP directory save (Output To: Filesystem (AOP Directory), When: Scheduled) |
| AOP_DOWNLOAD_MSG_CUSTOM_NOW | File generated to custom output location | After sending to custom output (Output To: Custom, When: Now) |
| AOP_DOWNLOAD_MSG_CUSTOM_BACKGROUND | File is generating into custom output location in the background | After starting background generation (Output To: Custom, When: Background) |
| AOP_DOWNLOAD_MSG_CUSTOM_SCHEDULED | File is scheduled to generate to custom output location. | After scheduling a custom output save (Output To: Custom, When: Scheduled) |
How to Use Translation Codes
-
Global Translation:
Define a text message in APEX with the translation code as the name and your translated text as the value. This applies the translation throughout your application. -
Per-Instance Override:
Use the Initialization JavaScript Code attribute to override translations for a specific plug-in instance:function(pOptions) {pOptions.translate = {"AOP_DOWNLOAD_LABEL_BUTTON_GENERATE": "Generate Report","AOP_DOWNLOAD_MSG_BROWSER_NOW": "Your file &AOP_FILENAME. is ready!"};return pOptions;}
Substitution Strings
Some message codes support substitution strings (like &AOP_FILENAME.) that are replaced with dynamic values at runtime. For example, AOP_DOWNLOAD_MSG_BROWSER_NOW uses &AOP_FILENAME. to show the actual file name in the message.
Tip:
You do not need to translate every code—only those you want to customize or localize.
Overriding Translations per Plug-in Instance
You can override any label or message for a specific plug-in instance using the Initialization JavaScript Code attribute.
Example:
function(pOptions) {
pOptions.translate = {
"AOP_DOWNLOAD_LABEL_MENU_ENTRY": "Export Report",
"AOP_DOWNLOAD_LABEL_BUTTON_GENERATE": "Generate",
"AOP_DOWNLOAD_MSG_BROWSER_NOW": "Your file is ready!"
};
return pOptions;
}
Supported Substitution Strings
Some messages support dynamic values using substitution strings:
| Substitution String | Usage | Description |
|---|---|---|
| AOP_FILENAME | &AOP_FILENAME. | Name of the generated file |
| AOP_MIMETYPE | &AOP_MIMETYPE. | MIME type of the generated file |
| AOP_JOBNAME | &AOP_JOBNAME. | Name of the background/scheduled job |
| AOP_SUBSCRIPTION_ID | &AOP_SUBSCRIPTION_ID. | ID of the saved report (table/email) |
| AOP_EMAIL_TO | &AOP_EMAIL_TO. | Recipient email address |
| AOP_EMAIL_CC | &AOP_EMAIL_CC. | Value of the E-mail CC item. |
| AOP_EMAIL_BCC | &AOP_EMAIL_BCC. | Value of the E-mail CC item. |
| AOP_EMAIL_SUBJECT | &AOP_EMAIL_SUBJECT. | Value of the E-mail Subject item. |
| AOP_SCHEDULE_START_DATE | &AOP_SCHEDULE_START_DATE. | Value of the Start Date item. |
| AOP_SCHEDULE_END_DATE | &AOP_SCHEDULE_END_DATE. | Value of the AOP_SCHEDULE_START_DATE item. |
| AOP_SCHEDULE_SCOPE | &AOP_SCHEDULE_SCOPE. | value of the Frequency item. |
| AOP_SCHEDULE_DAYS | &AOP_SCHEDULE_DAYS. | value of the Days of the week item. |
Example: Customizing a Message
To show a custom message when a file is downloaded:
- Add a text message in APEX with code
AOP_DOWNLOAD_MSG_BROWSER_NOW. - Set the value to:
Your report &AOP_FILENAME. is ready for download!
Or, override it for a single instance:
function(pOptions) {
pOptions.translate = {
"AOP_DOWNLOAD_MSG_BROWSER_NOW": "Your report &AOP_FILENAME. is ready for download!"
};
return pOptions;
}
Summary
- Use APEX Text Messages for global translations.
- Use Initialization JavaScript Code for per-instance overrides.
- Reference the translation codes and substitution strings for full customization.
Usage Guide
This guide will help you use the AOP Modal plug-in step by step, with clear instructions for common scenarios.
1. Basic Setup: Add AOP Modal to a Report
Step 1: Create a Dynamic Action
- Go to your APEX page with a report (Classic, Interactive, or Grid).
- Click Create Dynamic Action.
Step 2: Choose When to Trigger
- Page Load: To show the AOP Download option automatically.
- Button Click: To show the AOP Download dialog when a button is clicked.
- jQuery Selector Click: To show the dialog when a specific element is clicked.
Step 3: Set the True Action
- Change the True Action to United Codes AOP Download [Plug-in].
- Set Action to Initialize.
Step 4: Configure Affected Elements
- Region: Select your report region.
- jQuery Selector: Use a selector like
.exportWithAopto target multiple regions.
Step 5: Adjust Plug-in Attributes
- Settings: Enable/disable messages, spinner, etc.
- Report Type: Choose which formats to allow (PDF, Excel, etc.).
- Output To: Choose where the file goes (Browser, Email, Table, etc.).
- When: Choose when the report is generated (Now, Scheduled, Background).
- Template Selection: Pick which templates are available.
- Default Template: Set which template is preselected.
2. Set up with different triggers
A. Show AOP Download on Page Load
- Create a Dynamic Action with Event: Page Load.
- Set True Action to United Codes AOP Download [Plug-in].
- Set Affected Elements to your report region.
B. Show AOP Download on Button Click
- Add a button to your page (e.g., BTN_AOP_EXPORT).
- Create a Dynamic Action with Event: Click, Button: BTN_AOP_EXPORT.
- Set True Action to United Codes AOP Download [Plug-in].
- Set Affected Elements to your report region.
C. Show AOP Download on jQuery Selector
- Add a CSS class (e.g.,
exportWithAop) to your report region(s). - Create a Dynamic Action with Event: Click, jQuery Selector:
.exportWithAop. - Set True Action to United Codes AOP Download [Plug-in].
3. Advanced: Custom Output and Regions
Add a Custom Output ("Output To" Tile)
Use this to offer additional or custom output locations.
- In your Dynamic Action, add a new True Action.
- Set Action to Add a new "Output To" tile.
- Set Tile Text, Tile Icon, and Procedure Name (your custom PL/SQL procedure).
Add Additional Region Source
Use this to print multiple regions within the same document.
- In your Dynamic Action, add a new True Action.
- Set Action to Add an Additional Region Source.
- Set Affected Elements to the region you want to add.
4. Example: Generating a report without the end-user selection in the plug-in dialog
You can configure the AOP Modal to generate a report automatically, without showing the dialog to the end-user. This is useful for one-click exports or scheduled jobs.
How to do it:
-
Create a Dynamic Action
- Go to your report page.
- Click Create Dynamic Action.
-
Set the Event
- For automatic export on page load:
- Set Event to Page Load.
- For export on button click:
- Set Event to Click and choose your export button.
- For automatic export on page load:
-
Set the True Action
- Change the True Action to United Codes AOP Download [Plug-in].
- Set Action to Initialize.
-
Configure Plug-in Attributes
- Select only one value for each of these attributes:
- Report Type (e.g., PDF)
- Output To (e.g., Browser)
- When (e.g., Now)
- Template Selection (e.g., AOP Report)
- Default Template (must match your Template Selection)
- If only one value is selected for each, the dialog will not appear.
- Select only one value for each of these attributes:
-
Set Affected Elements
- Set Selection Type to Region and choose your report region.
- Or, use jQuery Selector to target multiple regions.
-
Save and Run the Page
- The report will be generated and downloaded automatically, without any dialog.
5. Generate the AOP JSON for Debugging
When you need to inspect the exact JSON that the plug-in sends to the AOP Server, for example to validate your data, share with the AOP support team, or troubleshoot a template, the AOP Modal can return that JSON as a downloadable file instead of producing the document.
There are two ways to enable this.
Method A: Use APEX Debug Mode (recommended for one-off troubleshooting)
This method does not require any change to your Dynamic Action. It is the fastest way to grab the JSON in dev or while reproducing a customer issue.
Step 1: Make sure the plug-in setting is on
- Open the AOP Modal Dynamic Action in Page Designer.
- In the plug-in attribute Settings, confirm the checkbox Add AOP JSON in debug mode is ticked.
- This is the default for new installs, so it is usually already on.
Step 2: Run the page in APEX Debug Mode
- Open the page where the AOP Modal is wired up.
- In the APEX developer toolbar at the bottom of the page, click Debug and choose Info (default) (or any level above Off).
- APEX reloads the page and adds the debug flag to the URL, for example
f?p=100:1:...::LEVEL6:::(the 5th colon-separated field is the debug level).
Step 3: Open the AOP Download dialog
- Click the button or link that triggers the AOP Modal Dynamic Action.
- In the Report Type select list inside the dialog, an extra option JSON now appears, on top of the report types you configured in the plug-in attributes.

Step 4: Download the JSON
- Select AOP JSON.
- Pick any Output To (the file will always come back to the browser for this report type).
- Click Go.
- The browser downloads a file named
aop_debug.jsoncontaining the exact payload the plug-in would have sent to the AOP Server. No real document is generated and the AOP Server is not contacted.
Note:
When you are done debugging, turn APEX Debug Mode back to Off in the developer toolbar so end-users do not see the AOP JSON option in their dialog.
Method B: Always expose AOP JSON (for repeated debugging or developer-only pages)
Use this when you want an always-available "Download JSON" choice, for example on an internal dev page, without needing to flip APEX Debug Mode each time.
Step 1: Edit the plug-in attribute Report Type
- Open the AOP Modal Dynamic Action in Page Designer.
- In the plug-in attribute Report Type, tick AOP JSON in addition to the other formats you offer (PDF, Excel, etc.).
- Save the page.
Step 2: Use the dialog
- Run the page (no APEX Debug Mode needed).
- Open the AOP Modal Dynamic Action.
- AOP JSON is now a permanent option in the Report Type select list.
- Pick it and click Go to download
aop_debug.json.
Note:
Because this exposes the JSON download to everyone who can open the dialog, only use Method B on pages that are restricted to developers. For end-user pages, prefer Method A.
What you get
- A file called
aop_debug.jsonis downloaded to your browser. - It is the exact JSON payload, identical to what the plug-in would normally POST to the AOP Server.
- You can open it in any text or JSON editor, validate it, attach it to a support ticket, or replay it manually against the AOP Server for further investigation.
6. Need More?
- For custom scenarios examples, see the Sample app.
Tips & Troubleshooting
- Only One Option? If you select only one value for Report Type, Output To, When, or Template, the dialog selection will be skipped.
- Translations: Use APEX Text Messages or Initialization JavaScript Code to translate or customize dialog text.
- Events: Use Dynamic Actions to respond to AOP events (e.g., show a message when a report is ready).
- Testing: Always test your setup by running the page and trying the download.
Summary:
- Decide when and how to show the AOP Modal (Page Load, Button, Selector).
- Set up a Dynamic Action with the plug-in.
- Configure options as needed.
- Test your setup.