melmckee72
New Member
I'm working with a program which creates a report with multiple output displays. All the same data but sorted differently in each iteration.
I've got a temp-table created with all the data necessary, and trying to do the different sortations.
I defined some variables as sortfield1, sortfield2, etc and then assigned those variables the field names of the temp-table that I am using.
It seems to work correctly except when I try to do a last-of statement. Then I just don't get any data.
for each fout no-lock break by sortfield1 by sortfield2 by sortfield3:
accumulate fqtym (total by sortfield3 by sortfield2 by sortfield1).
if last-of (sortfield3) display accumm total by sortfield3 fqtym.
end.
any ideas on whether or not this is legal? and if it is why I can't get any output?
I've got a temp-table created with all the data necessary, and trying to do the different sortations.
I defined some variables as sortfield1, sortfield2, etc and then assigned those variables the field names of the temp-table that I am using.
It seems to work correctly except when I try to do a last-of statement. Then I just don't get any data.
for each fout no-lock break by sortfield1 by sortfield2 by sortfield3:
accumulate fqtym (total by sortfield3 by sortfield2 by sortfield1).
if last-of (sortfield3) display accumm total by sortfield3 fqtym.
end.
any ideas on whether or not this is legal? and if it is why I can't get any output?