Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Reoprt

Reply
Thread Tools

Reoprt

 
 
amatuer
Guest
Posts: n/a
 
      06-12-2006
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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments