Within the report I've predefined TopNSorting(as LB suggested).
Within the code I’ve created simple Sub
Public Sub SpecSta2(ByVal N As Integer, ByVal iTopN As Integer)
Dim topBottomNSortField As TopBottomNSortField
If TypeOf oRpt.DataDefinition.SortFields.Item(iTopN) Is TopBottomNSortField Then
topBottomNSortField = oRpt.DataDefinition.SortFields.Item(iTopN)
topBottomNSortField.NumberOfTopOrBottomNGroups = N
End If
End Sub
where oRpt is ReportDocument
iTopN is index of the SortField
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.