0 Replies Latest reply: May 17, 2013 2:04 AM by Vedant RSS

    How to Hit Request of Invoice NO In print Option Conditionaly

    Vedant
      Dear Friend

      i want display to my print option enable and disable according to condition.So i have done some code in my Sql Query.Print Option is display me enable and disable condiotanly correctly but where Print option is ebalbe to print ,When i press print Link then it does not display me invoice details in PDF File to print .My Invoice no do not Hit invoice no as request to Print.

      What Shou.ld i do to pass invoice no to print Invoice.

      My print code which i have use to print
       CASE
                    WHEN NVL(VID.CONTROLSUM, 0) = NVL(VID.SUM, 0)
                    THEN
                       '<a href=http://org:1545/reports/rwservlet?SERVER=rep_inv_ora10gias+REPORT=REP_667.RDF+DESTYPE=CACHE+DESFORMAT=PDF+USERID=UDS/UDS@PROD+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,
      Here Request of inoice No Does not Hit.
      *P_SBU_CODE=0002+P_INVOICE_NO=INVOICE_NO*
      My Code
      This is my View code which i use in my Sql Query Report.View Name *VW_INVOICE_DTL_REPORT* 
      
      SELECT   am.INVOICE_NO,
                 CASE WHEN am.INVOICE_TYPE = 'C' THEN 'BLUE' END the_color,
                 CASE
                    WHEN am.CURR_CODE = 'GBP' THEN 'GREEN'
                    WHEN am.CURR_CODE = 'EUR' THEN 'purple'
                 END the_gbp,
                 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,
                 um.user_name,
                 cm.name,   
               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_DISTRIBUTION_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
      This is my Report SQL Query
      select
      VID.* 
      , 
                    CASE
                    WHEN NVL(VID.CONTROLSUM, 0) = NVL(VID.SUM, 0)
                    THEN
                       '<a href=http://org:1545/reports/rwservlet?SERVER=rep_inv_ora10gias+REPORT=REP_667.RDF+DESTYPE=CACHE+DESFORMAT=PDF+USERID=UDS/UDS@PROD+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
      How to Do This ?

      Thans

      Edited by: Vedant on May 17, 2013 12:03 AM