Page 1 of 1

Output document

Posted: Tue May 07, 2019 5:26 am
by HeshanKaru1994
Can you generate output document table using pm table data.

Re: Output document

Posted: Tue May 07, 2019 7:59 pm
by amosbatto
Use this trigger:
Code: Select all
$sql = "SELECT CLIENT_NAME AS clientName, CLIENT_PHONE AS clientPhone FROM PMT_CLIENTS";
@=clientsGrid = executeQuery($sql);

Then, put this in the HTML code of your Output Document template:
Code: Select all
<table><tbody>
<tr><th>Client Name</th><th>Client Phone</th></tr>
<!-- @>clientsGrid -->
<tr><td>@#clientName</td><td>@#clientPhone</td></tr>
<!-- @<clientsGrid -->
</tbody></table>
Make sure that you click on the "HTML" button to get the code.