Oracle Apex:电子邮件触发器中的特定项目,以表格格式显示

时间:2017-03-22 07:59:40

标签: oracle-apex oracle-apex-5 oracle-apex-5.1

我是编码和oracle apex 5.0的初学者,并开发了一个触发电子邮件的应用程序。我正在尝试安排一个名为“问题列表”的项目之一。以表格格式,因为它有多行。

项目的样本输出值(P1_LIST_OF_ISSUES)=(它在特定时间有一系列问题)

<p> Column1 || Column2 || Column3
Column1.1 || Column2.1|| Column3.1 
Column1.2 || Column2.2  || Column3.2
Column1.3 || Column2.2  || Column3.3 
</p>

我希望这些数据在我的电子邮件中以表格格式显示。 我目前的ITEM电子邮件代码是

[ <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000;" align="center"> 
  <tr><td width="100%" height="7"  ></td></tr> 
  <tr><td> </td></tr> 
  <tr><td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0"><tr><td>                 

   <p><font size="3" face="Arial, Helvetica, sans-serif"><strong> Issues: </strong> </font>  <br> ' || replace(:P1_LIST_OF_ISSUES,chr(10),'<BR>') ||  ' <br> <br><font size="3" face="Arial, Helvetica, sans-serif"><strong>  </td></tr></table></td></tr> </td></tr></table></td></tr>  
  <tr><td> </td></tr> 
</table> ]

谢谢。

2 个答案:

答案 0 :(得分:0)

&#13;
&#13;
1. Create one page item like P1_LIST_OF_ISSUES
2. Create one page button like submit and placed the button position in edit
3. Create one Region and change the region type like PL/SQL Dynamic Content
4. Copy paste the below source code in PL/SQL Code
<code>
begin
htp.p('<table style="width:50%; border-collapse:collapse;" border="1" align="center" cellpadding="7" cellspacing="7">
<tr>
   <td>
	   <strong> Issues: </strong>
   </td>
   <td>' ||   replace(:P1_LIST_OF_ISSUES,chr(10),'<BR>') ||'
   </td>
</tr>
</table>');
end;
</code>

5. Enter the text in P1_LIST_OF_ISSUES text box and then click the submit button, you will get the output
6. Basically the input value need to assign the texbox, so that we have to use the page button submit action
7. The page submit action asign the input box value to page item id...
8. Finally we got the output.
&#13;
&#13;
&#13;

答案 1 :(得分:0)

希望这会有所帮助..

DECLARE

  L_BODY   VARCHAR2(32767);

BEGIN

  L_BODY   := '<html> Here I give the HTML Code For Example <p>';
  L_BODY   := L_BODY || '<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000;" width="100%"><tr><td>';
  L_BODY   := L_BODY || REPLACE(:P1_LIST_OF_ISSUES,CHR(10),'</strong></font></p></td></tr><tr><td><font face="Arial, Helvetica, sans-serif" size="3"><strong><p>');
  L_BODY   := L_BODY || '</td></tr></table></html>';

  // call APEX_MAIL.SEND code

END;