mmaz
Programmer
- Nov 22, 2000
- 347
Hi,
I'm trying to change the sort order of my report fields at runtime. I'm calling CR 8 report from an ASP, and this report is connected to a .ttx file (Data Definition file). I'm passing a recordset. I'm not getting any error message, but the records are just not being sorted. Here's my code:
-------------------------------------------------------
set myReport = session("oRpt"
set Database = myReport.database
set Table1 = Database.Tables.Item(1)
if session("selectedSortOrder" = "Date" then
set SortOrderField = Table1.Fields.Item(1) (Date field)
else
set SortOrderField = Table1.Fields.Item(3) (Name field)
end if
myReport.RecordSortFields.Add SortOrderField,1 (ascending)
--------------------------------------------------------
Any help would be appreciated. Thanks in advance!
Marie
I'm trying to change the sort order of my report fields at runtime. I'm calling CR 8 report from an ASP, and this report is connected to a .ttx file (Data Definition file). I'm passing a recordset. I'm not getting any error message, but the records are just not being sorted. Here's my code:
-------------------------------------------------------
set myReport = session("oRpt"
set Database = myReport.database
set Table1 = Database.Tables.Item(1)
if session("selectedSortOrder" = "Date" then
set SortOrderField = Table1.Fields.Item(1) (Date field)
else
set SortOrderField = Table1.Fields.Item(3) (Name field)
end if
myReport.RecordSortFields.Add SortOrderField,1 (ascending)
--------------------------------------------------------
Any help would be appreciated. Thanks in advance!
Marie