Time,

Thank for the response. Moving the  -----Store Value in Report Variable 10 ------ = rv10+1 line instantly solved the problem.

As Don Friedman indicted it was a fault in my logic!

Victor Warner.

Tim Rude wrote:
Victor,
 
Move your line in the Report Body that assigns the value to RV10 to AFTER the Stop code. Otherwise RV10 is being incremented even when you reach the first record that doesn't match your criteria. Thus RV10 is over by one. Moving the incrementing to after the stop code makes it only increment on records that match your criteria, giving you an accurate count.
 
Tim Rude
 
===FIRST PAGE HEADER===
-----Store Value in Report Variable 10 ----- = 0
-----User Chooses Next Record By LookUp----
-----Store Value in Report Variable 1 ----- = P5P10

===REPORT BODY===
-----Store Value in Report Variable 2 ------- = P1F10=rv1
-----Stop [Sub]Report if 0 Is in Report Variable 2 -----
-----Store Value in Report Variable 10 ------ = rv10+1

===FINAL FOOTER===
Print RV10 = G999
----- Original Message -----
From: "Victor Warner" <[email protected]>
To: "'Dataperfect Users Discussion Group'" <[email protected]>
Sent: Monday, January 11, 2010 3:58 AM
Subject: [Dataperf] Problem with counting records

>I am having a problem using report variables to produce a total count of
> records (a subset of the total records in a panel) - consistently the
> total count produced by the report is one more than the records meeting
> the criteria chosen. For example, in P1F10 (a U18 field), if there are 4
> records which contains "NI308", the count produced by the report will be
> 5 not 4.
>
>
> The report is as follows:
>
> ????FIRST PAGE HEADER?????????
> -----Store Value in Report Variable 10 ----- = 0
> -----User Chooses Next Record By LookUp----
> -----Store Value in Report Variable 1 ----- = P5P10
>
> ????REPORT BODY???????????????
> -----Store Value in Report Variable 10 ------ = rv10+1
> -----Store Value in Report Variable 2 ------- = P1F10=rv1
> -----Stop [Sub]Report if 0 Is in Report Variable 2 -----
>
> ????FINAL FOOTER???????????????
> Print RV10 = G999
>
> Help with this would be greatly appreciated.
>
> Victor Warner
> _______________________________________________
> Dataperf mailing list
>
[email protected]
> http://lists.dataperfect.nl/mailman/listinfo/dataperf
>

_______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to