Giving Users Their Data
One of the most valued IR features is the ability for users to download report data in multiple formats. APEX supports CSV, HTML, Excel (XLSX), PDF, and Email directly from the Actions, then Download menu. Each format has configuration options and limitations that developers should understand.
Controlling Available Download Formats
In the IR Attributes, the “Download” section lets you enable or disable each format individually. For sensitive data, you might disable all downloads. For reports that will be used for further analysis, enable CSV and Excel but disable PDF. The settings are:
Enable CSV Download: Yes/No. Enable HTML Download: Yes/No. Enable Excel Download: Yes/No. Enable PDF Download: Yes/No (requires BI Publisher or APEX’s built-in PDF engine). Enable Email: Yes/No.
CSV and Excel Behavior
CSV downloads use the current report filters and sorting. If the user has filtered to 50 rows, the CSV contains 50 rows. The “Maximum Row Count” setting controls the upper limit. For large exports, increase this limit but be aware of memory implications.
Excel downloads create a true XLSX file with formatting. Column headers use the report column headings, not the SQL aliases. Number and date columns retain their data types in Excel, enabling users to create pivot tables and charts from the downloaded data.
PDF Configuration
APEX 21.1 and later include a built-in PDF engine that does not require BI Publisher. The PDF output respects the report layout including column widths, control breaks, and aggregates. Configure the PDF page size, orientation, and header/footer text in the IR Print Attributes:
Set the Print Server to “Native” (APEX built-in). Configure Header Text (supports substitution strings like &APP_USER. and &SYSDATE.). Set page size (Letter or A4) and orientation (Portrait or Landscape). For wide reports, Landscape is usually necessary.
Custom Download Filename
By default, APEX generates a filename based on the region title. Override this in the Print Attributes by setting the “File Name” property to a meaningful name with substitution strings:
orders_report_&APP_USER._&SYSDATE_YYYYMMDD.
Limiting Download to Authorized Users
To restrict downloads to certain roles, disable the built-in download and create a custom download button that checks authorization before calling APEX_IR.GET_REPORT to generate the export programmatically.