<HTML><FONT FACE=arial,helvetica><HTML><FONT SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="0">In a message dated 9/19/2004 4:30:29 PM Eastern Daylight Time, dayone@bright.net writes:<BR>
<BR>
<BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"><BR>
XP windows<BR>
5.0.13R9<BR>
5.0.13D9<BR>
<BR>
I am trying to run a simple report totaling a field with a single "Iffer" and I<BR>
get a different total running same data with dreport and rreport?<BR>
<BR>
two ways I have tried: ( @wgt is same in both instances)<BR>
<BR>
One:<BR>
-----<BR>
If:<BR>
Then: qn(9,.0)=3<BR>
----<BR>
If: 2 lt "100"<BR>
Then: qn=""<BR>
----<BR>
If:<BR>
Then: qo(9,.0)=qo+qn<BR>
----<BR>
If:<BR>
Then:end<BR>
----<BR>
<BR>
Two:<BR>
------<BR>
If: 2 ge "100"<BR>
Then: qn(9,.0)=3; qo(9,.0)=qo+qn<BR>
-------<BR>
If:<BR>
Then: end<BR>
-------<BR>
<BR>
-------<BR>
@wgt If:<BR>
Then: to=tot(qo)<BR>
------<BR>
<BR>
In both above using same exact record selection, I get 19 as total using<BR>
rreport and I get 18 as the total using dreport. 18 is the correct total.<BR>
<BR>
Is this some kind of bug or what am I doing incorrectly in rreport code that is<BR>
corect in dreprot code?<BR>
<BR>
Regards,<BR>
Charles Day<BR>
<BR>
</BLOCKQUOTE><BR>
<BR>
I don't understand your code exactly. If you're accumulating qo, why isn't qo global? The grand total, to, would then be the sum of the varying amounts at each record.<BR>
<BR>
Regards,<BR>
RWS<BR>
transpower@aol.com<BR>
Transpower Corporation<BR>
<A HREF="www.transpowercorp.com">www.transpowercorp.com</A><BR>
</FONT></HTML>