Sums don't work in Group Band
I have a simple report where the query has a dept group on it. In the report I have it grouping by department and displaying a count and sum of certain fields. The report stops printing after the first group is printed. If I remove the sum fields and leave the count, everything gets printed as it should. Why won't the sum of fields work in FreeReports?
Version 2.31, Delphi 6 Pro.
Thanks
Don Gollahon
Version 2.31, Delphi 6 Pro.
Thanks
Don Gollahon
Comments
I don't actually know what all is included or retricted in free report.
but if data is from a tble it must be presorted to meet group conditions.
if a query orderby clause must meet grouping conditions.
try extended syntax with sum function
[Sum([tblename."fieldname'],mdbandname)]
if that still won't work try using your own variables initialize to 0 in group header obp event and add to them in obp event of master data band
myvar = 0
in mdband myvar := [myvar] +[tablename."fieldname"]
But your final solution will work if you put it on the script of the band or any other control, caution has to be taken in order not to leave the last record unsummed.