Can anyone help to explain the order in which Crystal Reports 8.0.0.371 processes formulas within the Detail and Group sections?
I am using two groups within my report and need to be able to get the results from a formula that is calculated in the detail section into either the header or footer of the second group. I also want to reset the formula after it is printed in the group. Here is a very simple example:
Report Header: (initalize the variable to 100)
Formula SetIt:
numbervar a:=100;
Details Section: (add the records in group to variable)
Formula CountIt:
whilereadingrecords;
numbervar a := a+1;
Group Footer:
Formula DisplayIt: (I need the total from CountIt)
numbervar a;
Formula ResetIt: (Put it back to 100)
evaluateafter ({@displayit});
numbervar a:=100;
CountIt never gets set back to 100 by ResetIt. DisplayIt just shows 100. If I add the 'evaluateafter ({@countit});' line in DisplayIt, then countit always shows 101.
Is my problem with the order in which formulas are executed based on what section they are inserted?
Any help would be appreciated. Thanks!
I am using two groups within my report and need to be able to get the results from a formula that is calculated in the detail section into either the header or footer of the second group. I also want to reset the formula after it is printed in the group. Here is a very simple example:
Report Header: (initalize the variable to 100)
Formula SetIt:
numbervar a:=100;
Details Section: (add the records in group to variable)
Formula CountIt:
whilereadingrecords;
numbervar a := a+1;
Group Footer:
Formula DisplayIt: (I need the total from CountIt)
numbervar a;
Formula ResetIt: (Put it back to 100)
evaluateafter ({@displayit});
numbervar a:=100;
CountIt never gets set back to 100 by ResetIt. DisplayIt just shows 100. If I add the 'evaluateafter ({@countit});' line in DisplayIt, then countit always shows 101.
Is my problem with the order in which formulas are executed based on what section they are inserted?
Any help would be appreciated. Thanks!