I am trying to set the grouping / sorting fields at run-time from C#.NET against a Crystal Report.
I'm using the code as provided in the help files using syntax like :
FieldDefinition FieldDef = new FieldDefinition();
FieldDef = Report.Database.Tables[0].Fields["FieldName"];
Report.DataDefinition.Groups[0].ConditionField = FieldDef;
I have the appropriate 'using' set up (for CrystalDecisions.CrystalReports.Engine.FieldDefinition.FieldDefinition()).
When I attempt to compile this code I am presented with a build error suggesting that :
'CrystalDecisions.CrystalReports.Engine.FieldDefinition.FieldDefinition()' is inaccessible due to its protection level'.
I've followed / copied the code sample as suggested within the help files.
Where have I gone wrong / what am I missing ?
Any pointers / help would be appreciated.
Thanks in advance.
Steve
I'm using the code as provided in the help files using syntax like :
FieldDefinition FieldDef = new FieldDefinition();
FieldDef = Report.Database.Tables[0].Fields["FieldName"];
Report.DataDefinition.Groups[0].ConditionField = FieldDef;
I have the appropriate 'using' set up (for CrystalDecisions.CrystalReports.Engine.FieldDefinition.FieldDefinition()).
When I attempt to compile this code I am presented with a build error suggesting that :
'CrystalDecisions.CrystalReports.Engine.FieldDefinition.FieldDefinition()' is inaccessible due to its protection level'.
I've followed / copied the code sample as suggested within the help files.
Where have I gone wrong / what am I missing ?
Any pointers / help would be appreciated.
Thanks in advance.
Steve