Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert field to RecordSortFields

Status
Not open for further replies.

SteveMac32

Programmer
Jan 25, 2002
74
GB
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top