Reputation: 81
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
Upvotes: 8
Views: 10780
Reputation: 1
Create 2 columns.
For the column with URL the Server-side plsql expression should read:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and instr(nvl(:REQUEST,'~'),'CSV') = 0
and
instr(nvl(:REQUEST,'~'),'HTML') = 0 and instr(nvl(:REQUEST,'~'),'PDF') = 0
For the column WITHOUT the URL the Server-side plsql expression should read:
not(instr(nvl(:REQUEST,'~'),'XLS') = 0 and instr(nvl(:REQUEST,'~'),'CSV') = 0
and
instr(nvl(:REQUEST,'~'),'HTML') = 0 and instr(nvl(:REQUEST,'~'),'PDF') = 0)
Upvotes: 0
Reputation: 61
The most upvoted answer didn't work for me.
The workaround from @George worked for me as well:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and
instr(nvl(:REQUEST,'~'),'CSV') = 0
I applied this at an Interactive Report column (APEX 21.2)
Upvotes: 0
Reputation: 141
This one did not work for me:
NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD')
So another workaround could be the following:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and instr(nvl(:REQUEST,'~'),'PDF') = 0 and instr(nvl(:REQUEST,'~'),'HTMLD') = 0
Same logic applies for csv, rtf, etc.
Upvotes: 4
Reputation: 141
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'
Upvotes: 13