Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interactive Report download conditional columns

Eng. Aktham NassarSep 16 2013 — edited Sep 16 2013

The download option is APEX interactive reports allows users to download report in different formats. Some times we are displaying html columns that we don't want to see in the downloaded files.

How to do this?

You can add a condition to each column you don't want to be included in downloaded file, to do this:

In the column condition section select "PL/SQL Function Body Returning a Boolean" as condition type and enter below in condition body:

RETURN NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD') and nvl(apex_application.g_widget_action,'-') <> 'SEND_EMAIL';

The "nvl(apex_application.g_widget_action,'-') <> 'SEND_EMAIL" condition used to conditionally download columns when download type is EMAIL. The EMAIL download type uses ajax request to send email and not doing regular page submit requests like other download types. I write this condition after tracing the browser request when clicking on send email button and noticed that p_widget_action parameter is set to 'SEND_EMAIL' after clicking on send email button,

I hope this post will help astonishing apex developers to implement conditional interactive report download easily!

Thanks,

Aktham

Comments

vdsadhi

Are you looking for this??...

Action-> Download -> When you click on CSV icon it will send a request as "CSV".

Edit the columns which you don't want to include in csv output file.


Go to Condition section,

Condition Type: Request Is NOT Contained within Expression 1

Expression1: CSV

That column will not include in the csv file.

Thanks

Lakshmi

Eng. Aktham Nassar

I am sorry Lakshmi, my first post version was incomplete!, i don't know what keyboard shortcut i clicked to post it i updated it now.

Thanks for your reply.

vdsadhi

Please try this, hope it will work....


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

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

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

Thanks

Lakshmi

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 14 2013
Added on Sep 16 2013
3 comments
1,087 views