From: Rick on
I get an Invalid Index error in the following code; please help...
Invalid Index. (Exception from HRESULT:0x800200B (DISP_E_BADINDEX)

string sortField = "City";
ReportDocument objReport = new ReportDocument();
objReport.Load("MyReport");
FieldDefinition FieldDef;
FieldDef = objReport .Database.Tables[0].Fields[sortField]; //ERROR HERE
objReport.DataDefinition.SortFields[0].Field = FieldDef;
objReport.DataDefinition.SortFields[0].SortDirection =
CrystalDecisions.Shared.SortDirection.DescendingOrder;