Reoprt

A

amatuer

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top