User88744855 posted
my report group based. only three group is coming. i just want to show group total at end of each group and grand total of all the group at the report end.
so i wrote a function like
Dim public totalPercentage as Double
Dim public Grptotal as Double
Public Function CalculateTotal(ByVal SaleOUR AS Double,ByVal Warranty AS Double) AS Double
Grptotal=IIF(SaleOUR > 0 , Math.Round(Warranty * 100 \ SaleOUR,2) ,0)
totalPercentage = totalPercentage + Grptotal
return Grptotal
End Function
Public Function GroupGrandTotal()
return totalPercentage
End Function
i call this two function like . first at group footer level
=Code.CalculateTotal(SUM(Fields!SALE_OUR.Value, "GrpCatagoryName"),SUM(Fields!WARRANTY_WARRANTYOUR.Value, "GrpCatagoryName"))
and at the end row for group grand total
=Code.GroupGrandTotal()
the problem is group grand total is not right. i guest that grand total is not showing right value because each group is not coming in same page. so how to fix this problem when report has multiple pages and where there are many group.