Bonjour cher tous. Je voulais rédiger un rapport HTML. Ce rapport doit pouvoir afficher les roster avec les données. Comme sur le questionnaire papiers. Comment écrire celà.
Cordialement
HTML report
Re: HTML report
I made a few modifications to the existing report in the CAPI Census example. Here's a snippet of the report code.
The only other change was to load a household case before calling the report via loadcase. The result looks like this:
Code: Select all
<!-- Report content -->
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Relationship</th>
<th>Sex</th>
</tr>
<? do numeric ctr = 1 while ctr <= count(PSC_HOUSEHOLD_DICT.POPULATION_RECORD) ?>
<tr>
<td>~~strip(HH_NAME(ctr))~~</td>
<td>~~getlabel(HH_RELATIONSHIP_WITH_HEAD_VS, HH_RELATIONSHIP(ctr))~~</td>
<td>~~getlabel(HH_SEX_VS1, HH_SEX(ctr))~~</td>
</tr>
<? enddo; ?>
</thead>
</table>
Re: HTML report
Thanks Aaron! It's exactly the same way that I did using latest CSPro 7.7 HTML new report features. Before this. It was more time consuming using file.write.
@Dabwil, pour completer Aaron, vous pouvez jeter un coup d'oeil sur mon post dans le sujet: viewtopic.php?p=14470#p14470 et telecharger un example de resultats ici: download/file.php?id=1878
Et aussi quelques explications ici: viewtopic.php?p=11491&hilit=print#p11491
Best
@Dabwil, pour completer Aaron, vous pouvez jeter un coup d'oeil sur mon post dans le sujet: viewtopic.php?p=14470#p14470 et telecharger un example de resultats ici: download/file.php?id=1878
Et aussi quelques explications ici: viewtopic.php?p=11491&hilit=print#p11491
Best
G.VOLNY, a CSProuser from Haiti, since 2004