stevejones
Programmer
Hi,
I have recently converted to using VB.Net with crystal 8.5 and am trying to allow the user to create a dynamic report,
i.e. they select ranges, which fields they wish to display etc.
This all works fine. I am now trying to allow the user to select sort order field.
The following is code im using :
' Define the order by field
Dim crFormulaOrdField As FormulaFieldDefinition
crFormulaOrdField = Report.Database.Tables.Item _
(0).Fields.Item("{table.fieldname}"
Report.DataDefinition.SortFields.Item(0).Field _
= crFormulaOrdField
There are no actual database fields on the report as I use formula fields and assign the data fields to them. The second of the above code lines is giving an error.
If anyone can help, thanks
Steve
I have recently converted to using VB.Net with crystal 8.5 and am trying to allow the user to create a dynamic report,
i.e. they select ranges, which fields they wish to display etc.
This all works fine. I am now trying to allow the user to select sort order field.
The following is code im using :
' Define the order by field
Dim crFormulaOrdField As FormulaFieldDefinition
crFormulaOrdField = Report.Database.Tables.Item _
(0).Fields.Item("{table.fieldname}"
Report.DataDefinition.SortFields.Item(0).Field _
= crFormulaOrdField
There are no actual database fields on the report as I use formula fields and assign the data fields to them. The second of the above code lines is giving an error.
If anyone can help, thanks
Steve