Skip to Content
0
Oct 11, 2011 at 02:53 PM

Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

199 Views

I get this error when setting the papersource of a report:

crystalMainReport.PrintOptions.PaperSource = paperSource

But this has nothing to do with the papersource which has a correct value. The error comes when the report has a database field which no longer exists in the SQL Server (2005) database. After deleting the obsolete field from the report, the error goes away.

In the old RDC-times, a non existing dbfield was simply ignored. So how do I get rid of this error without verifying the report each time I want to print it? Or is it a bug?

PS. I'm working with Visual Studio .Net 2008 and Crystal Reports 2008 SP4.

Patrick