Pagination Questions



  • Hi,

    I have a report that should generate multiple regular numbers of a report per page. Think of it like either Business card printing, name badge printing, or receipt printing etc.

    I don't mind using handlebars to process this, and there's supposedly a solution detailed here, but I'm not sure how jsreport handles user created helpers.

    This link is an article on how to make a "Grouped" Each Helper:
    grouped_each Helper

    For Example, I have a business card sheet that I'm printing name badges onto. There are 8 cards per sheet, and each row of cards, 2 per row, is the front/back of a single name badge. This means there should be only 4 badges per sheet.

    I'm using Flexbox in my CSS to shift the front and back sides onto a single row. The biggest issue I've come across is maintaining the spacing across pages. I want to eventually have it look something like this.

    <div class='container'>
        {{grouped_each 4 Badges}}
            <div class='cardContainer'>
                <div class='card'>
                   <div class='leftCard'>
                      <!-- left Card Content -->
                  </div>
                  <div class='rightCard'>
                     <!-- right Card Content -->
                   </div>
             </div>
           </div>
        {{/grouped_each}}
    </div>
    


  • Sorry I found the solution Here



  • I'm going to put this in the playground for more help.

    PlayGround Link

    It runs, but is consequently blank all around....



  • Maybe you could read the get started tutorial.
    There you can find how to create a helper function and how to associate the sample data.
    Or isn't this the actual problem?

    You mentioned that you use flex box. Please note the phantomjs doesn't support flex. You may need to use electron-pdf recipe for it.



  • Went through the tutorial, but it doesn't cover what's not supported as far as CSS, and doesn't link I to resources needed to learn the default engines or recipies. Flex box is working perfectly with the appropriate resets. Only when I try to use the helper.


Log in to reply
 

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