a footer section will always print the last record's values. If you need to see a prior value in a footer you will need something like shared variables...
they tend to come in sets of 3, though for a report footer, you can probably get away with 2:
reset (usually in a group header):
shared stringvar x :=""
increment (usually in the detail section)
shared stringvar x;
if some condition then
x := {table.field};
"" // hide the output
display (usually in a group footer):
shared stringvar x;
x
HTH