0

我是编码和 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>

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

[ <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> ]

谢谢你。

4

2 回答 2

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;
于 2017-03-27T19:03:40.543 回答
0

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.

于 2017-03-22T10:26:46.653 回答