Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use previous value of a shared NumberVar

Status
Not open for further replies.

thebigbadwolf

Programmer
Jul 7, 2010
67
CY
Can I somehow use previous value of a shared NumberVar which syntaxed

whileprintingrecords;
numbervar hours_line;
hours_line := hours_line + {VCR_EMPLOYEE_FEEDBACK.VWOEF_ACTUAL_HOURS};

?
 
You'd need a separate statement to save it, e.g.
Code:
whileprintingrecords;
numbervar Prev_hours_line;
Prev_hours_line := hours_line
But it all depends where you put this command.

Consider also some other method, e.g. running totals that use a formula to collect for just some records. Or possibly crosstabs.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top