By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Reoprt

P: n/a
Hi, im tryng to display some data in a report.
The data im displaying is corect,but it contains calculating totals as
well. The totals that r displayng r incorrect.Plaese hav a look at the
code below to see if u cn spot anythng im doing wrong.

<% If Method <> "" then %>
<% If Method <> rstMain("Metode") then
MTel = 0%>
<TR>
<td colspan="2"><font face="Tahoma" size="-2"
color="Black"><B><I>Total for <%= Method %></I></B></font></td>
<td align="right"><font face="Tahoma" size="-2" color="Black"><B><%=
MTel %>fj</B></font></td>
</tr>
<% End If
End If %>
<tr>
<td><font face="Tahoma" size="-2" color="Black"><%=
rstMain("Metode") %></font></td>
<td><font face="Tahoma" size="-2" color="Black"><%=
rstMain("Onderwerp") %></font></td>
<% If rstMain("Opmerking") <> "" Then %>
<td><font face="Tahoma" size="-2" color="Black"><%=
rstMain("Opmerking") %></font></td>
<% Else %>
<td><font face="Tahoma" size="-2" color="Black">&nbsp;</font></td>
<% End If %>
</tr>
<% MTel = MTel + 1 %>
<%Method = rstmain("Metode")
Total1 = Total1 + 1 %>
<%rstMain.Movenext
Wend %>
<TR>
<td colspan="2"><font face="Tahoma" size="-2"
color="Black"><B><I>Total for <%= Method %></I></B></font></td>
<td align="right"><font face="Tahoma" size="-2" color="Black"><B><%=
MTel %></B></font></td>
</tr>
<TR>
<td colspan="2"><font face="Tahoma" size="-2"
color="Black"><B><I>Total for Contacts for the
Month</I></B></font></td>
<td align="right"><font face="Tahoma" size="-2" color="Black"><B><%=
Total1 %></B></font></td>
</tr>
<% End If %>

The total which is diaplyng wrong is the 1st MTel.Of which is contained
in an if statement which should nt excecute because the condition does
nt fulfill,bt it is excecuting.

Please help!

Jun 12 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.