Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating Reports

Status
Not open for further replies.

biglurch

Programmer
Aug 25, 2005
35
US
I have a relational database, and i want to generate a report that pulls all the users from the users table, and pulls the classes they are registered for from the classes table and then prints one useres information on a page and it generates one page for each user. I can pull the information from the database easily with an inner join the problem is i dont know how to make it print on a separate page. Any suggestions or links to pages would be appreciated.

Live by the code, Die by the code!!
 
the concept of "pages" is somewhat nebulous in a browser. it becomes more relevant in printed form.

have you looked for the @media descriptor in css and the page-break-before declaration.

Code:
<style>
.pagebreak {
 page-break-before: always;
}
</style>
<?
foreach ($row as $user):
//insert user information
echo "<div class=\"pagebreak\">&nbsp;</div>";
endforeach;
?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top