How to Exclude Columns in Oracle APEX Interactive Report Downloads
Interactive Report in Oracle APEX provides out-of-the-box functionality to download the report in various formats. However, there are instances when we need to exclude specific columns from these downloaded reports. While APEX doesn't offer a declarative approach, there's a simple method to achieve this.
We have simple report based on the OEHR_EMPLOYEES table that displays list of employees. We want to exclude the "Salary" column from being downloadable in the report.
As of APEX 23.2, we can download report in these four format.
To exclude any columns from being downloaded in report, put a server side condition on the column of type PL/SQL Expression and use the following as the expression:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and
instr(nvl(:REQUEST,'~'),'CSV') = 0 and
instr(nvl(:REQUEST,'~'),'HTML') = 0 and
instr(nvl(:REQUEST,'~'),'PDF') = 0
To exclude Salary column in our report add the service-side condition as shown below.
Now, when you download the report, the "Salary" column will be excluded from the downloaded report.
Subscribe to my newsletter
Read articles from Rutvik Prajapati directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by