Apex - Interactive Report - Hide Column in CSV Download?

Paul Fresner picture Paul Fresner · Mar 14, 2012 · Viewed 7.5k times · Source

I've got an interactive report in Apex with some columns. The user has the option to download the report as CSV file with the standard functionality.

Is there a way to hide a column in the export but display it on the screen.

(Background: one column is a custom link that should not be exported into the CSV)

Thank you ! Paul

Answer

Jason Lyle picture Jason Lyle · Mar 20, 2012

You can hide it by putting a condition on the column of type PL/SQL Expression and using the following as the expression:

NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD')

That will check the APEX bind variable "REQUEST", and if it is CSV, XLS, PDF, XML, RTF or HTML then the column will not be shown!

More info
To stop a column from showing up for an email, you can use the following:

NVL(wwv_flow.g_widget_action, 'EMPTY') != 'SEND_EMAIL'