Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

An unhandled exception 'System.Runtime.InteropServices.COMException

I have designed a crystal report based on the typed dataset so i am passing the dataset as source like

rpt.SetDataSource(dsTempDataSet.Tables("StateTimeStudyReport"))

since my crystal report is having one parameters values so i want to pass the value for this parameter but when i am trying to access the parameter from the report using

Dim MyParamValues As New ParameterValues

MyParamValues = rptTimesheetState.DataDefinition.ParameterFields("piPositionID").CurrentValues

i am getting the following exception

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll

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

I have noticed while debugging that when i set the datasource for the crystal report instance, all the parameters list is getting vanished / deleted and its count showing Zero.

and i set the datasource property after inistializing the parameters values first, i am getting the exception "Missing parameters values". So in both cases i am getting the different exception

I am using the following environment:

OS : windows 2003 server

.Net framework: 2.0

VS : 2005

Please let me know the solution. I am tried a lot with all the permutaion and combinations.

thanks

Former Member
Not what you were looking for? View more on this topic or Ask a question