4 Replies Latest reply on Jun 14, 2014 9:39 PM by Dory_ALM

    Conditional Column Link in Classic Report

    Dory_ALM

      Hi I am tring to show a link in a column only if another column has a value in that row. However the column I am trying to conditionally show must call a javascript funtion on click (it pops up a modal window) and it has to comprise of an image.

       

      My Report query is

         select

         ac.c001,

         ac.c015

         apex_util.prepare_url('f?p=&APP_ID.:4:&SESSION.::&DEBUG.::P4_PARCEL_ID:' || ac.c001  )   LINK_URL     ,-- my conditional image onclick link

         FROM apex_collections ac

         WHERE collection_name = :P3_COLLECTION_NAME

       

      Report attribute COLUMN LINK settings are:

      LINK ATTRIBUTE : <img src="#WORKSPACE_IMAGES#fff_report.png" />

      URL : javascript:mymodal('#LINK_URL#','View Comments')

       

      This works but it shows the report.png image on every row of the report. I need to combine the link attribute and the url within the select statement with a CASE statement to conditionally show this but I cannot get the correct string built...can any one help??

       

      I am looking for

      SELECT

      case when ac.c015 is not null then

        apex_util.prepare_url('f?p=&APP_ID.:4:&SESSION.::&DEBUG.::P4_PARCEL_ID:' || ac.c001  )   LINK_URL     ( add on the image and the javascript call...?????)

      else

      null

      end LINK_URL

      from....

      Thanks

       

      Andy