콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
9637 화면

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.

아바타
취소
베스트 답변

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 ...

관련 게시물 답글 화면 활동
4
5월 23
10538
0
10월 17
3467
0
11월 16
2727
0
10월 16
4974
0
8월 16
3109