3 Replies Latest reply: Sep 16, 2013 4:17 AM by vdsadhi RSS

    Interactive Report download  conditional columns

    Eng.AkthamNassar

      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