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.
Bu soru işaretlendi
1
Cevapla
11753
Görünümler
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 ...
Tartışma hoşunuza mı gidiyor? Sadece okumakla kalmayın, katılın!
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
4
May 23
|
13914 | ||
|
|
3
Eyl 24
|
54983 | ||
|
|
0
Eki 17
|
5162 | ||
|
|
0
Kas 16
|
4847 | ||
|
|
0
Eki 16
|
6789 |