GroupFooter shows contents of next data record instead of actual

Peter M??llerPeter M??ller Germany
edited 9:06PM in FastReport 4.0
Hi,

I have the problem that the GroupFooter shows the contents of the next record instead of the actual. GroupHeader, DetailData and the sum function on the GroopFooter show the actual and correct record contents.

In my report I have the following components: MasterData, GroupHeader, DetailData and GroupFooter.
GroupHeader.Condition is set to a DataField of a DataSet (Firebird-SQL, ordered to this field).
On GroupHeader a TfrxMemoView is correctly shown with a DataField of the DataSet. On GroupFooter the same contents of this DataField (should be shown as Sum of "DataField") in a TfrxMemoView and the sum of another DataField should be shown. The sum is correct but the DataField on the GroopFooter always shows the contents of the next record in the DataSet. For the last record the field is empty.

Is this a known bug? I use version 4.14.2 of FastReport with RAD Studio XE2.

What can I do to get the correct contents of the actual record?

Thanks,

Pepe

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:06PM
    No it is not a bug it is a miss use of the fr group bands
    see the main demo nested groups for an example of how to use group headers for a master detail report using
    one query across all tables
    or see the masterdetail report for using tables.
  • Peter M??llerPeter M??ller Germany
    edited 9:06PM
    gordk wrote: »
    No it is not a bug it is a miss use of the fr group bands
    see the main demo nested groups for an example of how to use group headers for a master detail report using
    one query across all tables
    or see the masterdetail report for using tables.

    Thanks, I tested the example, it works fine with a TADOConnection and demo.mdb.

    Then I changed my report to GroupHeader, MasterData and GroupFooter, but the result is the same as before: the sum is correct but the DataField on the GroopFooter always shows the contents of the next record in the DataSet. For the last record the field is empty.
    I use FirebirdSQL with a TSQLConnection and a TSQLQuery (dbExpress), perhaps I have to change some settings?

    Thanks,

    Pepe
  • Peter M??llerPeter M??ller Germany
    edited August 2014
    I could not solve the problem with FirebirdSQL with a TSQLConnection and a TSQLQuery (dbExpress), so I think it's a bug.

    I solved the problem with a workaround by defining 2 user functions. One is used in GroupHeader and returns the value of the SQL data field and saves it to a local variable. The other ist used in GroupFooter and returns the value of the previously saved local variable.

    Pepe
  • gpigpi
    edited 9:06PM
    This is not a bug. Use IBX instead of DBX

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.