Topic: Keeping last row data with group. Posted: 01 Apr 2010 at 7:54am
I have a report that is being grouped by Company Name. One of the requirements for my report is to show a total line at the end of each group. Almost everything in that total line is a sum--except for 2 fields. These two fields return the last row's value and I have set them up as formula fields.
This is how my report is set up:
Page Header <<report title, etc.>>
PageHeader Section 1 <<Page headers>>
GroupHeader Section1 <<Group Header -- in this case grouping by Company Name>>
Details <<Columns for my data>><<Part I of Formula Field>>
GroupFooter <<Total Line>> <<Formula Fields Part II for last record's data>>
Ok--the problem here is that when i run the report, the Grouping works just fine...the sums show up at the end of every group and everything is peachy until it hits my formula fields.
My formula fields are as follows:
In the details section, i have put in this:
shared StringVar lastValue; if (OnLastRecord) then lastValue := {DataTable1.IRR_Time_Weighted}
In the Total row, i have this:
shared StringVar lastValue; lastValue;
The problem here is that this does not retrieve the last report row's value on each group--but rather at the very end of the report for the LAST group only. Is there any way for me to write this formula to say "on every group change, you must retrieve the last report row's value" ??
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 01 Apr 2010 at 7:57am
If this is just for display purposes just stick the actual table field in the group footer and it will display the value from the 'last row of that group'
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum