0 Replies Latest reply: May 17, 2013 1:33 AM by Vedant RSS

    How to Print Enable Disable Conditionaly

    Vedant
      Dear Friend

      i want to disable and enable my Print Option on conditions (Condition define in my below Report code) in classic Report.

      So to print invoice i have used code in report.bUt here my Invoice no does not hit and invoice not print.

         CASE
                    WHEN NVL(VID.CONTROLSUM, 0) = NVL(VID.SUM, 0)
                    THEN
                       '<a href=http://abc.xyz.org:1534/reports/rwservlet?SERVER=rep_oraapps_ora10gias+REPORT=REP_OPR_667.RDF+DESTYPE=CACHE+DESFORMAT=PDF+USERID=TEST/TEST@ABC+P_SBU_CODE=0002+P_INVOICE_NO=INVOICE_NO>Print</a>'
                   
       WHEN NVL (VID.CONTROLSUM, 0) <> NVL (VID.SUM, 0)
                    
                    THEN
                       'PRINT'
                 END
                    AS the_PRINT,
      My View Code (VW_INVOICE_DTL_REPORT)
      
      ---------------------------------------
      
      SELECT   am.INVOICE_NO,
                    am.INVOICE_NO AS invoice,
                 am.INVOICE_TYPE,
                 am.INVOICE_DATE,
                 am.CONSULTANT_NAME,        
      DECODE (am.INVOICE_TYPE,
                         'I', (NVL (SUM (al.AMOUNT), 0)),
                         (NVL (SUM (al.AMOUNT), 0)))
                    AS SUM,
                    NVL (am.inv_dtl_amt, 0) AS CONTROLSUM,
                 CASE
                    WHEN NVL (am.inv_dtl_amt, 0) <> NVL (SUM (al.AMOUNT), 0)
                    THEN
                       'RED'
                 END
                    the_sum,  
                 Inv_in_apps (Am.Invoice_no) AS apps_FLG
                
          FROM   AR_INVOICE_MAS am,
                  AR_INVOICE_DTL al
                 
         WHERE       am.invoice_no = al.invoice_no(+)
                 
      GROUP BY   am.ID,
                 am.invoice_no,
                 am.INVOICE_TYPE,
                 am.INVOICE_DATE,
                 am.inv_dtl_amt
      My Report Code where i have user Print Option
      select
      VID.* 
      ,
                    CASE
                    WHEN NVL(VID.CONTROLSUM, 0) = NVL(VID.SUM, 0)
                    THEN
                       '<a href=http://abc.xyz.org:1534/reports/rwservlet?SERVER=rep_oraapps_ora10gias+REPORT=REP_OPR_667.RDF+DESTYPE=CACHE+DESFORMAT=PDF+USERID=TEST/TEST@ABC+P_SBU_CODE=0002+P_INVOICE_NO=INVOICE_NO>Print</a>'
                   
       WHEN NVL (VID.CONTROLSUM, 0) <> NVL (VID.SUM, 0)
                    
                    THEN
                       'PRINT'
                 END
                    AS the_PRINT,
       
      CASE VID.APPS_FLG
                    WHEN  'N'
                    THEN
                       '<a href="f?p=&APP_ID.:5:&SESSION.:MODIFY:&DEBUG.:5:P5_SBU_CODE,P5_INVOICE_NO:
      '
                       || VID.SBU_CODE
                       || ','
                       || VID.INVOICE_NO
                       || ':"><img src="#IMAGE_PREFIX#edit.gif" alt="Edit"></a>'
                    WHEN 'Y'
                    THEN
                       '<img src="#IMAGE_PREFIX#edit.gif" alt="Invoice Transfered">'
                 END
                    AS the_Edit,
                 CASE VID.APPS_FLG
                    WHEN 'Y'
                    THEN
                       '<font color ="Gray"></b>Revenue</b></font>'
                    ELSE
                       '<a href="f?p=&APP_ID.:41:&SESSION.:MODIFY:&DEBUG.:41:P41_sbu_code,P41_Invoice_no:'
                       || VID.SBU_CODE
                       || ','
                       || VID.INVOICE_NO
                       || ':">
      <font color =GRAY><b>Revenue</b></font></a>'
                 END
                    AS Revenue
      FROM VW_INVOICE_DTL_REPORT VID