How to recalculate row formula on sort change |
Post Reply |
Author | |
Carrolo
Newbie Joined: 25 November 2014 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 25 November 2014 at 12:09pm |
I have a grid where the last column is SUM(R0*C8:R" & Me.ReportControl1.Records.Count & "*C9)
But, when re-sort, even changing the formula, it doesn't work.
This is the code that i use to change the formula:
Private Sub ReportControl1_SortOrderChanged()
Dim i As Integer Dim Row As ReportRow Dim ReportRow As ReportRow For i = 0 To ReportControl1.Rows.Count - 1
Set Row = ReportControl1.Rows(i) If Not Row.GroupRow Then Set ReportRow = Row ReportRow.Record.Item(9).Formula = "SUM(R0*C8:R" & i & "*C9)" End If Next ReportControl1.ReCalc True ReportControl1.Redraw End Sub Hope you can help me
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |