Last post Mar 31, 2011 02:02 PM by peterafonin
Mar 30, 2011 07:12 PM|peterafonin|LINK
I'm sorting the Crystal Report (2008) programmatically:
FieldDefinition fdSortField = rpt.Database.Tables.Fields[ddlSort.SelectedItem.Value];
rpt.DataDefinition.SortFields.Field = fdSortField;
rpt.DataDefinition.SortFields.SortDirection = CrystalDecisions.Shared.SortDirection.AscendingOrder;
rpt.DataDefinition.SortFields.SortDirection = CrystalDecisions.Shared.SortDirection.DescendingOrder;
(the user selects the sort field from the Dropdown list ddlSort and the sort direction from the Radiobutton list rbSort).
This works fine, the only problem is that this doesn't work for the formula fields, because they are not part of the database. However, since it is possible to set the sort order by the formula field in design
time, it should be possible to do this programmatically.
I would appreciate your advice on this.
Mar 31, 2011 12:36 PM|Stevishere|LINK
As I understand, there is not access to CR Formula fields outside of the CR editor.
Mar 31, 2011 02:02 PM|peterafonin|LINK
Thanks. Yes, seems like it.