2 Replies Latest reply: Apr 27, 2013 6:53 AM by Sudhir_Meru RSS

    Image is not getting printed on the page.

    Sudhir_Meru
      Hi,

      I am using oracle apex 3.2 and Oracle 10g XE database. I am creating a email template based on the plsql and html content
      DECLARE
        l_header VARCHAR2(8000);
        l_content VARCHAR2(18000);
        l_footer VARCHAR2(8000);
      
       CURSOR contract IS
          SELECT DISTINCT contract_number, l.company_name
          FROM ib_support_contracts_mv c, customer_products p, customer_locations l
          WHERE c.serial_number = p.product_serial_number
          AND   p.location_id = l.location_id
          AND   c.contract_number = :P5_CONTRACT_NUMBER
          AND   ROWNUM <= 1
          AND   sub_line_status != 'TERMINATED'  
          AND   line_status != 'TERMINATED' 
          AND   header_status != 'TERMINATED';
      
      --    AND   header_status = 'ACTIVE'
      --    AND   line_status = 'ACTIVE';
      
        CURSOR product (v_contract_number IN VARCHAR2) IS
          SELECT DISTINCT order_number, installed_at_name, ship_to_name, bill_to_name, item_description, 
             serial_number, service_start_date, service_end_date, cust_po_number, service_description, 
             ship_date
          FROM ib_support_contracts_mv v1
          WHERE contract_number = v_contract_number
          AND   NVL(order_number, 99999) = 
                (SELECT max(NVL(order_number,99999)) FROM ib_support_contracts_mv v2
                 WHERE  v1.serial_number = v2.serial_number
                 AND    v1.contract_number = v2.contract_number
                 AND    v2.line_status != 'TERMINATED')
          AND ROWNUM <= 100
          AND  sub_line_status != 'TERMINATED'  
          AND  line_status != 'TERMINATED'  
          AND  header_status != 'TERMINATED'
      
          ORDER BY item_description;
      
      --    AND   header_status = 'ACTIVE'
      --    AND   line_status = 'ACTIVE'
      --
      --    AND   ship_date IS NOT NULL
      
      BEGIN
        l_header := '<table width="100%">
                       <tr>
                         <td align="left">
      *<img src="#WORKSPACE_IMAGES#merunetwork.jpg">*
                         </td>
                         <td align="right"><h2>Support Contract Certificate</h2>
                         </td>
                       </tr>
                       <tr>
                         <td colspan="2"><br/>
                           <p>Thank you for purchasing award winning product and services from Meru Networks.<p>
                           <p>Below are the details of your service order, confirming support order completion.</p>
                         </td>
                       </tr>
                     </table>' || utl_tcp.crlf ;
      
        FOR c IN contract LOOP
          l_content := '<div style="text-align: center;"><h2>CID: ' || c.contract_number || '</h2><h2>' || c.company_name || '</h2></div>' || utl_tcp.crlf ;
      
          l_content := l_content || '<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tab0">' || utl_tcp.crlf ;
          l_content := l_content || '  <tr class="tab0">' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">Products Covered</th>' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">Service Ordered</th>' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">Serial Numbers</th>' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">Begin Date</th>' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">Expires</th>' || utl_tcp.crlf ;
          l_content := l_content || '    <th class="tab0">PO</th>' || utl_tcp.crlf ;
          l_content := l_content || '  </tr>' || utl_tcp.crlf ;
      
          FOR p IN product(c.contract_number) LOOP
            l_content := l_content || '  <tr>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.item_description || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.service_description || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.serial_number || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.service_start_date || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.service_end_date || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '    <td class="tab0">' || p.cust_po_number || '</td>' || utl_tcp.crlf ;
            l_content := l_content || '  </tr>' || utl_tcp.crlf ;
          END LOOP;
          l_content := l_content || '</table>';
      
        END LOOP;
      
        l_footer:= l_footer|| '<h3>Meru Assure Reference Links:</h3>' || utl_tcp.crlf ;
        l_footer:= l_footer|| '<a href="http://www.merunetworks.com" target="_new">http://www.merunetworks.com</a>' || utl_tcp.crlf ;
        l_footer:= l_footer|| '<p>If at any time you have questions regarding the activation of your service contract or any other questions please contact our customer group at Meru Networks.</p>' || utl_tcp.crlf ;
        l_footer := l_footer|| '<h3>How to reach Meru Customer Support group:</h3>' || utl_tcp.crlf ;
        l_footer := l_footer|| '<ul><li>24x7x365 online support portal <a href="http://support.merunetworks.com" target="new">http://support.merunetworks.com</a>.</li><li>Toll-free numbers:<br/>   <strong>In United States: </strong>1 888 637 8952<br/>   <strong>In United Kingdom: </strong>0800 085 7381<br/>   <strong>In France: </strong>080 554 0108<br/>   <strong>In Norway: </strong>800 30 354<br/>   <strong>In Sweden: </strong>020 160 5667<br/>   <strong>In Denmark: </strong>80 600 087<br/>   <strong>In Japan: </strong>0120 924853</li><li>Direct number:<br/>   Regions outside toll-free areas: 1 650 385 3114</li><li>Email address:<br/>   support@merunetworks.com</li></ul>' || utl_tcp.crlf ;
      
        l_footer := l_footer|| '<p>We look forward to working with you in the future and thank you for purchasing a MeruAssure support plan.</p><br/>Sincerely,<br/><br/>Trevis Schuh<br/>Vice President - Worldwide Support & Services' || utl_tcp.crlf ;
      
      
        l_footer:= l_footer|| '' || utl_tcp.crlf ;
      
        l_footer:= l_footer|| '';
      
        :P5_CONTENT := '<STYLE>.TableBorder {border-top: 4px solid #b3394e;border-right: 4px solid #b3394e;border-left: 4px solid #b3394e;border-bottom: 4px solid #b3394e;padding: 10px;}
      .formLabel {font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;font-size: 11px;font-weight: bold;color: #000000;}
      .GroupBox {border-top: 1px solid #BDC7D6;border-right: 1px solid #BDC7D6;border-bottom: 1px solid #BDC7D6;border-left: 1px solid #BDC7D6;}
      body { font: 12px/16px Verdana, "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif; color: #555; margin: 0 auto; }
      table.tab0 { background: #eee; vertical-align: top; font: 0.9em sans-serif; border: solid 0px #b3394e; }
      th.tab0 { padding: 6px; margin:1px; color: #b3394e; font: 0.9em sans-serif; text-transform: uppercase; font-weight: bold; border-top: 4px solid #b3394e; border-bottom: 1px solid #b3394e; border-left: 0; border-right: 0; background-color: #fff; text-align: left;}
      td.tab0 { padding: 5px; vertical-align: top; border-bottom: 1px solid #b3394e; background-color: #fff; }
      tr.tab0 { }
      td.tab0s { padding: 5px; vertical-align: top; border-bottom: 1px solid #b3394e; background-color: #fff; white-space:nowrap; font-weight: bold;  }
      td.tab0 a { color: #08c; }
      td.tab0 a:link, a:visited, a:active { text-decoration: none; }
      td.tab0 a:hover { text-decoration: underline; }
      h1 { font-weight: bold; font-size: 24px; margin-top: 5px; margin-bottom: 8px; color: #b3394e; line-height: 26px; }
      h2 { font-weight: bold; font-size: 18px; margin-top: 5px; margin-bottom: 8px; color: #b3394e; line-height: 24px; }
      h3 { font-weight: bold; font-size: 14px; margin-top: 5px; margin-bottom: 8px; color: #b3394e; line-height: 20px; }
      h4 { font-weight: bold; font-size: 10px; line-height: 18px; color: #b3394e;}
      .smallcaps { color: #333; font: 0.8em sans-serif; text-transform: uppercase; }
      </STYLE>' || utl_tcp.crlf ||
             '<div>
                <table width="98%" cellpadding="5" cellspacing="5">
                  <tr>
                    <td>' || utl_tcp.crlf ||
                      l_header || l_content || l_footer ||
             '      </td>
                  </tr>
                </table>
              </div>' ||  utl_tcp.crlf;
      END;
      Problem am facing here is i am trying to dispaly a logo in the template which is uploaded in the workspace. Its not getting display please suggest me how to fix this issue.

      Thanks
      Sudhir