Page breaking for a table with duplicating of a content



  • Hey!

    Currently, I have a table and a chart. The table can exceed page size causing some content to be on another page and that's ok. The problem is that the chart should be strongly linked to a table and if the table exceeds page size and part of it is moved to the next page - chart should be repeated on the next page.

    A solution that I have is to render the chart template and merge it to every page of the table's template. But that seems pretty odd since I'm using the 'render for every page' method which is deprecated and also I want to have that component to be single and not to be reliable on template merging.

    Please advise if there are any other ways to achieve the same behavior and to have everything under the same component.

    JSReport Online Studio for mentioned templates



  • Sorry, wrong link

    Here's link to playground : Playground



  • This post is deleted!


  • I'm unaware of any css solution that could work for this case. The thead would repeat the element on the top of every page for you, but I'm afraid you won't be able to position it as you want.

    I'm afraid you will need to stick with the pdf utils merge. To optimize rendering, you can render the chart just once and merge it to all pages using jsreport script
    https://playground.jsreport.net/w/anon/1RyVSTCV

    Maybe you can use it as a "component" and append/prepend such template to other templates again using pdf utils and scripts.


Log in to reply
 

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