TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nitol Biswas
NA
173
28.7k
Invalid index. (Exception from HRESULT: 0x8002000B )
Feb 5 2017 12:47 AM
When I try to load my Crystal report the following error is happened.
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Here is my Code:
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"C:\IFAD-Reports\CrystalReportDemo.rpt");
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = textBox1.Text;
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["Product"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
How can I fix this problem please help.
Reply
Answers (
1
)
How to assign dataset values in Header in RDLC report
Crystal report Design show boxes as shown i attachment