vazdan
1
I want to show a table with the elements of a Child table for the Print Format of a custom Doctype.
I want a fixed table with 8 rows and 9 columns, so that only the cells containing data are filled in, leaving the cells without data blank.
I’ve been testing, but I can not give the table the format I want.
Hi @vazdan,
have you tried an HTML/Jinja insert like this
<table>
<tr>
<td>{{ doc.items[0].item_code or "" }}</td>
<td>{{ doc.items[0].item_name or "" }}</td>
<!-- ... -->
</tr>
<tr>
{% if doc.items[1] %}
<td>{{ doc.items[1].item_code or "" }}</td>
<td>{{ doc.items[1].item_name or "" }}</td>
<!-- ... -->
{% else %}
<!-- define empty row -->
{% endif %}
</tr>
<!-- ... -->
</table>
Define your hard-coded table design, fill the content where available.
Hope this helps.
2 Likes
vazdan
3
I tried similar things, but none like this. Thank you @lasalesi