RTC Report: show the subtotal at the end of each group

vandangvandang Member Posts: 101
edited 2014-04-15 in NAV Three Tier
almost can finish this report except the subtotal, it doesn't show at the end of each group:
Group 1
Item1     1
Item2     2
Item3     3
Item4     4
Item5     5
 Subtotal 0

 Group 2
Item1     1
Item2     2
 Subtotal 15 (get from subtotal of Group1)
I had the code below:
Public totalRevenue As Decimal
Public Function SumUp(ByVal value As Decimal,ByVal value2 As Integer) As Decimal
  If value2 = 1 then
    totalRevenue = 0
  End If
    totalRevenue  = totalRevenue  + value
     Return totalRevenue 
End Function
The line detail was grouped by items, I use below code to call the function at the anohter textbox on this detail line
=Code.SumUp(ReportItems!Lab_Revenue.Value,RowNumber("Group_Labor"))

Then call this function at the Subtotal textbox at below line: =Code.totalRevenue

http://stackoverflow.com/questions/6993234/reporting-services-how-to-get-sum-of-values-using-reportitemstextbox1-value

Comments

Sign In or Register to comment.