Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Add Page Break in as a nested loop

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I am trying to add a nested loop to add a page break in in every change in employee name.  I have attached my code any help would be appreciated.
Thank you!


Test 3rd Party<br />
<br />
 
<table border="1" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<th>Assignment</th>
<th>Employee Name</th>
<th>Discipline</th>
<th>Date</th>
<th>Start</th>
<th>End</th>
<th>Hours</th>
<th>Time Off</th>
</tr>
<tr>
<td>{tablerow from=$_rows item=_row}{$costcentersfullpath}</td>
<td> {$_row.name}</td>
<td>{$_row.discipline}</td>
<td>{$_row.date}</td>
<td>{$_row.start}</td>
<td>{$_row.end}</td>
<td>{$_row.hours}</td>
<td>{$_row.TimeOffName}{/tablerow}</td>
</tr>
</tbody>
</table>
 <br />
<br />
<br />
 
<div><formfeed></formfeed></div>
 

<table class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt">
<tbody>
<tr>
<td style="border:solid windowtext 1.0pt; width:116.85pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"><b>Employee Name</b></td>
<td style="border:solid windowtext 1.0pt; width:116.85pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"><b>Total Hours</b></td>
<td style="border:solid windowtext 1.0pt; width:116.9pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"><b>Approved</b></td>
<td style="border:solid windowtext 1.0pt; width:116.9pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"><b>Comments</b></td>
</tr>
<tr>
<td style="border:solid windowtext 1.0pt; width:116.85pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156">{tablerow from=_rows item=_row}{$name}</td>
<td style="border-bottom:solid windowtext 1.0pt; width:116.85pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156">{$Hours1+$Hours2}</td>
<td style="border-bottom:solid windowtext 1.0pt; width:116.9pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"> </td>
<td style="border-bottom:solid windowtext 1.0pt; width:116.9pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="156"> </td>
</tr>
</tbody>
</table>
 
Saloon Keeper
Posts: 24557
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome the the Ranch, Jenns!

You can make it easier to read preformatted text such as HTML, XML and Java code by wrapping it in Code tags. We have a button for that on our message editor.

I don't think that "formfeed" is a valid HTML tag and HTML will ignore invalid tags. However, you can use CSS to attach a print page break to a valid HTML tag such as a div tag.

https://www.w3schools.com/cssref/pr_print_pageba.asp

Note that paging works on printers, but not on the screen. HTML expects the screen to scroll continuously.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic