1
Answer

Crystal reports error while setting parameter in asp.net

Sudhakar Patil

Sudhakar Patil

11y
3.8k
1

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

Source Error: 

Line 66:             CrystalReportViewer1.LogOnInfo = crTableLogonInfos; Line 67:            string sid=Convert.ToString("MU-057-0005"); Line 68:            cryRpt.SetParameterValue("StructureID", sid); Line 69:              CrystalReportViewer1.ReportSource = cryRpt; Line 70:             CrystalReportViewer1.RefreshReport();

Source File: d:\Updated SRS website\Reports\Rep_DemolitionList.aspx.cs    Line: 68 

Stack Trace: 

[COMException (0x8002000b): Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))]    CrystalDecisions.ReportAppServer.DataDefModel.FieldsClass.get_Item(Int32 Index) +0    CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(Int32 index) +78    CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(String fieldName) +99    CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue(String name, Object val) +305    Rep_DemolitionList.Page_Load(Object sender, EventArgs e) in d:\Updated SRS website\Reports\Rep_DemolitionList.aspx.cs:68    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35    System.Web.UI.Control.OnLoad(EventArgs e) +99    System.Web.UI.Control.LoadRecursive() +50    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Answers (1)