SteveMac32
Programmer
I have inherited a report that has 4 group headers on which the report will be sorted, I have been tasked to add an extra one, this is where my problem begins.
I have added an extra groupheader to sort by but from what I can tell a value is not being added into the RecordSortFields.
I have used the Record Sort Order in Crystal’s tool bar and my group header is there.
I am at a total loss and may well be rambling but am in need of help, below is the code in VB that I use to set it up but I cannot reference the new RecordSortFields(6).Field because there is no value there.
Case strListItem5
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(6).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Hope I make some sort of sense
For intSortPos = 1 To 4
Select Case colSortFields(intSortPos)
Case strListItem1
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(1).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem2
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(2).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem3
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(3).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem4
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(4).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case Else
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(5).Field
Sections("GroupHeader" & intSortPos).Suppress = True
End Select
Next
Thanks a lot
Steve
I have added an extra groupheader to sort by but from what I can tell a value is not being added into the RecordSortFields.
I have used the Record Sort Order in Crystal’s tool bar and my group header is there.
I am at a total loss and may well be rambling but am in need of help, below is the code in VB that I use to set it up but I cannot reference the new RecordSortFields(6).Field because there is no value there.
Case strListItem5
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(6).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Hope I make some sort of sense
For intSortPos = 1 To 4
Select Case colSortFields(intSortPos)
Case strListItem1
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(1).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem2
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(2).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem3
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(3).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case strListItem4
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(4).Field
Sections("GroupHeader" & intSortPos).Suppress = False
Case Else
Areas(2 + intSortPos).GroupConditionField = RecordSortFields(5).Field
Sections("GroupHeader" & intSortPos).Suppress = True
End Select
Next
Thanks a lot
Steve