close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

nested repeat regions

Thread began 4/20/2011 2:29 am by acaciasd344844 | Last modified 4/29/2011 7:35 am by acaciasd344844 | 4500 views | 7 replies

acaciasd344844

nested repeat regions

Hi I wonder if you can help?

I have been playing around with nested repeat regions and dont seem to be able to make it work. The page should display multiple invoices and each invoice should contain multiple products. I checked some of the other posts but couldn't find anything similar. Thanks

Here is the code for the page in question

<?php
// RepeatSelectionCounter_2 Begin Loop
$RepeatSelectionCounter_2_IterationsRemaining = $RepeatSelectionCounter_2_Iterations;
while($RepeatSelectionCounter_2_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_2 || $row_Recordsetmultiprint){
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" colspan="6"><table width="100%" border="0">
<tr>
<td width="30%"><form id="form1" name="form1" method="post" action="">
<div align="right">
<input name="logo" type="image" id="logo" src="<?php echo $row_Recordsetmultiprint['companylogo']; ?>" align="right" />
</div>
</form> </td>
<td width="64%"><div align="right"><?php echo $row_Recordsetmultiprint['compnameadd']; ?></div></td>
</tr>

</table></td>
</tr>

<tr>
<td colspan="6" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td width="10%" nowrap="nowrap">&nbsp;</td>
<td width="10%" nowrap="nowrap">Invoice Date:</td>
<td width="83%" nowrap="nowrap"><?php echo $row_Recordsetmultiprint['printdate']; ?></td>
</tr>
<?php if ($totalRows_Recordsetdisplayinvoiceid > 0) { // Show if recordset not empty ?>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">Invoice Number:</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['invoiceid']; ?></td>
</tr>
<?php } // Show if recordset not empty ?>

<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><strong>Account Ref:</strong></td>
<td nowrap="nowrap"><strong><?php echo $row_Recordsetmultiprint['customerid']; ?></strong></td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">To:</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['cust_name']; ?></td>
</tr>
<tr>
<td valign="top" nowrap="nowrap">&nbsp;</td>
<td valign="top" nowrap="nowrap">Address:</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['cust_houseno']; ?>&nbsp;<?php echo $row_Recordsetmultiprint['cust_street']; ?></td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['district']; ?></td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['town']; ?></td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><?php echo $row_Recordsetmultiprint['postcode']; ?></td>
</tr>


<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><div align="center" class="style2">
<div align="left">Invoice</div>
</div></td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="8%">&nbsp;</td>
<td><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td nowrap="nowrap"><div align="left"><?php echo $row_Recordsetmultiprint['title1']; ?></div></td>
<td nowrap="nowrap"><div align="left"><?php echo $row_Recordsetmultiprint['title2']; ?></div></td>
<td nowrap="nowrap"><div align="left"><?php echo $row_Recordsetmultiprint['title3']; ?></div></td>
<td nowrap="nowrap"><div align="right"><?php echo $row_Recordsetmultiprint['title4']; ?></div></td>
<td nowrap="nowrap"><div align="right"><?php echo $row_Recordsetmultiprint['title5']; ?></div></td>
</tr>
<tr>
<td colspan="5" nowrap="nowrap"><hr /></td>
</tr>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_Recordsetdisplayproducts){
?>
<tr>
<td nowrap="nowrap"><?php echo $row_Recordsetdisplayproducts['product1']; ?></td>
<td nowrap="nowrap"><?php echo $row_Recordsetdisplayproducts['product2']; ?></td>
<td nowrap="nowrap"><?php echo $row_Recordsetdisplayproducts['product3']; ?></td>
<td nowrap="nowrap"><div align="right"><?php echo $row_Recordsetdisplayproducts['product4']; ?></div></td>
<td nowrap="nowrap"><div align="right"><?php echo $row_Recordsetdisplayproducts['product5']; ?></div></td>
</tr>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_Recordsetdisplayproducts && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_Recordsetdisplayproducts = mysql_fetch_assoc($Recordsetdisplayproducts);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
<tr>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><hr /></td>
</tr>
<tr>
<td><?php echo $row_Recordsetmultiprint['notes']; ?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><div align="justify"><?php echo $row_Recordsetmultiprint['invoicetxtcomm']; ?></div></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
<tr>
<td colspan="6" valign="top">&nbsp;</td>
</tr>
<tr>
<td colspan="6" valign="top">&nbsp;</td>
</tr>
<tr>
<td colspan="6" valign="top"><hr /></td>
</tr>
<tr>
<td colspan="6" valign="top"><hr /></td>
</tr>
</table>
<?php
} // RepeatSelectionCounter_2 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_2 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_2 && $RepeatSelectionCounter_2_IterationsRemaining != 0){
if(!$row_Recordsetmultiprint && $RepeatSelectionCounter_2_Iterations == -1){$RepeatSelectionCounter_2_IterationsRemaining = 0;}
$row_Recordsetmultiprint = mysql_fetch_assoc($Recordsetmultiprint);
}
$RepeatSelectionCounter_2++;
} // RepeatSelectionCounter_2 End Loop
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...