Reoprt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amatuer

    Reoprt

    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.Plaes e 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"><fo nt 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("Onderw erp") %></font></td>
    <% If rstMain("Opmerk ing") <> "" Then %>
    <td><font face="Tahoma" size="-2" color="Black">< %=
    rstMain("Opmerk ing") %></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.Moven ext
    Wend %>
    <TR>
    <td colspan="2"><fo nt 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"><fo nt 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!

Working...