How to repeat a part of code in each page?



  • Hello, im trying to make a complex page with a lot of data, and because there are a lot of data, i want to replicate the "header" in each page. Here's the playground

    https://playground.jsreport.net/w/alesssz/ICUQXYgU

    I'd like to repeat each "header"

    0_1702918131001_upload-326623c5-1967-4c57-a250-ba8f9ec080ca

    These parts, in each object (so "Appoggi", "Barriera", "Giunti", "Impalcati" and so on, with their subheaders, like "N° Elem.", "N° Segn.", "Codice", "Note" etc) in each new page, grouped by the data structure.

    This is the part of code i want to repeat

    <div class="col-sm-12 VI-object-title">{{object}}</div></div>
    <div class="row header-style">
    	<div class="col-sm-1 VI-border-right">N° Elem.</div>
    	<div class="col-sm-1 VI-border-right">N° Segn.</div>
    	<div class="col-sm-1 VI-border-right">Codice</div>
    	<div class="col-sm-2 VI-border-right">Note</div>
    	<div class="col-sm-1 VI-border-right">VI</div>
    	<div class="col-sm-2 VI-border-right">Difetto</div>
    	<div class="col-sm-1 VI-border-right">Intensità</div>
    	<div class="col-sm-1">Estens.</div>
    	<div class="col-sm-2 VI-border-left">Dettaglio</div>
    </div>
    

    I know that tables do that already, but the data structure is too complex to accept tables (or at least, im not good enough to make it work).

    Is there any way to do this?



  • If the table thead standard doesn't fulfill your needs, you need to merge the header using pdf utils.
    https://jsreport.net/learn/pdf-utils

    Here is an example
    https://playground.jsreport.net/w/admin/ihh7laK2



  • @admin my mistake, i forgot to add the header i already have...I forgot to mention and add it, so I cannot use pdf utils in that way as im already using it. I updated my playground...is there another way? Or is it possible to add multiple headers (in a specific point and not at the absolute top position)?


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.