hi, I would like to know how to set maximum displayed rows table in qweb report. for example i need 5 rows in the first page and the other rows the second page.
Dette spørgsmål er blevet anmeldt
1
Svar
11760
Visninger
Hi Yasmina,
You could work with a variable which you use as a counter in the for loop. Every time the counter is dividible by a number (for example 5) you can add a page break to display the next records on the following page. Something along the lines of:
<tr t-foreach="o.your_lines" t-as="line">
<td>
<span t-esc="line.name"/>
</td>
<t t-set="i" t-value="i+1"/>
<!-- This will only be on every fifth row. Page break after -->
<t t-if="i % 5 == 0">
<div style="page-break-before:always;"></div>
</t>
</tr>
Regards,
Yenthe
thank you , but whene i used this solution it break and all the table is in the second page. and me i want to get 5 rows in the first page ...
Kan du lide at diskutere? Læs ikke bare med, deltag aktivt i debatten!
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
|
4
maj 23
|
13926 | ||
|
|
3
sep. 24
|
55000 | ||
|
|
0
okt. 17
|
5179 | ||
|
|
0
nov. 16
|
4853 | ||
|
|
0
okt. 16
|
6795 |