Skip to Content
0
Jun 21, 2018 at 04:10 PM

The group options for a date, time or date-time condition field must be a date group ...

105 Views

Hi All,

I'm using VS2017 and trying to convert my reports from Delphi to , but the problem with some until this point that My users can change their sort from the GUI and I need to dynamically adjust the sort in code to match their selection.

To do this I use the following code:

ReportDocument.DataDefinition.Groups[i].ConditionField =

ReportDocument.Database.Tables[CrystalReportDatasource].Fields[cField];

However if cField is a DateField and the original is a StringField group i receive the following exception :

"The group options for a date, time or date-time condition field must be a date group options object crystal reports" when I try and excute the above statement.

Any idea how to fix that ?