Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6198119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:56:28+00:00 2026-05-24T03:56:28+00:00

How do i print the above table data in two pages based on group

  • 0

data table

How do i print the above table data in two pages based on group types seperately? Can this be achieved with window.print and some css and javascript tweaks?

Any idea/suggestion are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:56:29+00:00Added an answer on May 24, 2026 at 3:56 am

    So, when the table switches from a group of “Teddy Bear” to “Baby Bear” you want this on a new page?

    If so, then structure the table with separate <thead> and <tbody> sections, like so:

    <table>
        <thead>
            <tr class="pageBreak">
                <th>Child</th>
                <th>Group</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Alberto</td>
                <td>Teddy Bear</td>
            </tr>
            <tr>
                <td>Guadalupe</td>
                <td>Teddy Bear</td>
            </tr>
        </tbody>
        <tbody>
            <tr>
                <td>Carlos</td>
                <td>Baby Bear</td>
            </tr>
            <tr>
                <td>Oswaldo</td>
                <td>Baby Bear</td>
            </tr>
        </tbody>
    </table>
    

    Notice that different groups are in different <tbody>s.

    Then you can use CSS like:

    tbody {page-break-after:always;}
    

    And the groups will print on separate pages, plus in most browsers, the headers will be repeated.

    Print or print preview this example at jsBin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Updated I have some huge data, which becomes a large table say table parent
Consider: print $foo, AAAAAAAA, $foo, BBBBBBBB; Let's say I want to use this code
I want to print the first 10000 prime numbers. Can anyone give me the
I need to print out data into a pre-printed A6 form (1/4 the size
I have some CSV data files that I want to import into mySQL. I
I have a large table (2,000,000 rows) and I'd like to print each record
I have some data from database coming out in a loop. Each of these
I want to have a database table that keeps data with revision history (like
This question is in two parts: A) Is my design wrong? If so, what
I have two MySQL database tables that are meant to hold data for eshop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.