I am trying to apply template using your sample, i.e. invoice form but not avail.
I defined the template via web, where only the header is defined, with the sample invoice header provided as below:
Created a template called etiuae_invoice, the following code is kept under the header tab.
<table style="margin-top: 40px;margin-bottom: 30px">
<tr>
<td rowspan=3>
</td>
<td style="padding-left:10px" rowspan=3>
<span style="font-size:2em">#company</span>
#address
</td>
<td colspan=3> </td>
</tr>
<tr>
<td style="width:220px"></td>
<td style="text-align:right"><b>#{DATE}:</b></td>
<td style="text-align:right">#date</td>
</tr>
<tr style="vertical-align: top;">
<td style="width:220px"></td>
<td style="text-align:right"><b>#{INVOICE} #:</b></td>
<td style="text-align:right">#invoice_nbr</td>
</tr>
</table>
Then in the report, I inserted the following:
select 'dbr.template', '#etiuae_invoice';
select 'Company Name' as 'company',
'Address' as address,
convert(date, getdate(),120) as date,
convert(char(10), getdate(),112) as invoice_nbr
It seems all template variables show up as it is, i.e. #company, #address, #{DATE}:, #date, #{INVOICE} #:, #invoice_nbr
which they were not replaced accordingly by the following select statement which
#company should be 'Company Name' etc.
Please advise