Identify the number of report grouplevels??
Posted on 2002-04-28
i am looping around report group levels..
Problem...i dont know how many group levels a report may have, so i have to loop until the end..
once i get to the end of the group levels the program crashes because the object has no data..
i was advised to use the syntax
'If Not (Reports(0).GroupLevel(i) Is Nothing)
but his does not work, any ideas ??
below is an example of the code...
'Identifies the sort order for each field
'For i = 0 To 9
'If Not (Reports(0).GroupLevel(i) Is Nothing) Then 'not work!!!
If (Reports(0).GroupLevel(i).SortOrder) = False Then
MsgBox ("The Field " + Str(i) + " is in Descending Order")
MsgBox ("The Field " + Str(i) + " is in Ascending Order")