Show image with report and template
Posted: June 27th, 2019, 5:57 am
Hi,
I'm using this code to show a report with a template.
The function to fill the array record is
When calling this function, the report display the content of the array by not the Image
My template is here
How we can show the picture/image in the template
I'm using this code to show a report with a template.
The function to fill the array record is
Code: Select all
array string LISTE_UNITE(50,6);
function rapport();
setreportdata("title","Récap");
numeric j = 1;
forcase DICT_ECHANTILLON do
LISTE_UNITE(j,1) = strip(E_COMMUNE);
LISTE_UNITE(j,2) = strip(E_RAISON_SOC);
LISTE_UNITE(j,3) = strip(E_TYPE_EMPLOYEUR);
LISTE_UNITE(j,4) = strip(E_ADRESSE);
LISTE_UNITE(j,5) = strip(E_TIR_REM_ADD);
LISTE_UNITE(j,6) = "<img src='vert.png'>";
inc(j);
endfor;
setreportdata(LISTE_UNITE);
report(PATH_RAPPORT+"recap.html");
end;
My template is here
Code: Select all
<div id="cspro_report"></div>
<script type="application/vnd.cspro.report-template" id="cspro_report_template">
<h2>{{title}}</h2>
<table border="1" align="center">
<tr><th>COM.</th><th>RAISON SOC.</th><th>TYPE</th><th>ADRESSE</th><th> </th><th> </th></tr>
{{#LISTE_UNITE}}
<tr>{{#.}}<td>{{.}}</td>{{/.}}</tr>
{{/LISTE_UNITE}}
</table>
</script>