Sums don't work in Group Band

edited 9:24AM in FreeReport
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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:24AM
    Hi Don
    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"]
    ;)
  • edited 9:24AM
    Nice one gordk, but FreeReport does not have events.

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.