Hmm, this is kinda strange. It you look at the ungrouped output you can see that the numbers returned are correct. So where am I messing up Peter?
I've changed my code a bit: I moved the bit that zero's out the total and tests for a negative to the query output area.
code: <table cellpadding="2" align="center">
<tr>
<td align="center"><font face="arial" size="4"><b>Kiln Number</b></font></td>
<td align="center"><font face="arial" size="4"><b>Batch Date</b></font></td>
<td align="center"><font face="arial" size="4"><b>Species</b></font></td>
<td align="center"><font face="arial" size="4"><b>Footage In</b></font></td>
<td align="center"><font face="arial" size="4"><b>Value In</b></font></td>
<td align="center"><font face="arial" size="4"><b>Footage Out</b></font></td>
<td align="center"><font face="arial" size="4"><b>Value Out</b></font></td>
<td align="center"><font face="arial" size="4"><b>Variance</b></font></td>
<td align="center"><font face="arial" size="4"><b>Absorption</b></font></td>
<td align="center"><font face="arial" size="4"><b>MFG Variance</b></font></td>
</tr>
<!---
Loop the output and display it
--->
<CFOUTPUT QUERY="kilns">
<cfset intotal = 0>
<cfif rudTotal GT 0>
<cfset intotal = intotal + rudTotal>
</cfif>
<!---
Set values in our variables
--->
<TR>
<td align="center"><font face="arial" size="4">#ruhID#</TD>
<td align="center"><font face="arial" size="4">#DateFormat(ruhDate, "MM/DD/YYYY")#</TD>
<td align="center"><font face="arial" size="4">#MID(rudProductID,6,2)#</TD>
<td align="center"><font face="arial" size="4">#NumberFormat(ConsumedVol, ",")#</TD>
<td align="center"><font face="arial" size="4">#intotal#</td>
<td align="center"><font face="arial" size="4">#NumberFormat(ProducedVol, ",")#</TD>
</TR>
</CFOUTPUT>
</TABLE> |