GroupFooter shows contents of next data record instead of actual
Peter M??ller
Germany
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
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
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
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