Prev: I thought this should work :-(
Next: strange way to subscibe to an event without explicitly using the EventHandler
From: Rick on 1 Feb 2010 11:52 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; |