Crystal reports causes an error invalid index after being opened and having "any" change applied and saved
I have a windows service written in vb.net 1.1 using vs 2003. I also have a crystal reports template version 8.0. I have recently been asked to modify this report by shifting a text object on the report about a centimeter over. I have done this and now the application throws an invalid index error on the following line of code :
The code in the service simply refrences report objects by name and sets text string for those text objects on the report template. I have not changed anything on the report. On the developement machine I have both crystal 8 and crystal 10 installed. the exact error I get is:
Run-time exception thrown : System.Runtime.InteropServices.COMException - Invalid index
If mReportType = mdlGlobalVariables.rptReportType.rptCarton Then 'TIM 11780 cmj 9/8/05 - removed subreport code With mReport.Sections("D") .ReportObjects("TrayDisclaimerUpper").SetText(strUpper) .ReportObjects("TrayDisclaimerLower1").SetTex(strLower1) .ReportObjects("TrayDisclaimerLower3").SetTex(strLower3)End With Else mReport.Sections("Header1").ReportObjects("TrayDisclaimerUpper").SetText(strUpper) mReport.Sections("DisclaimerTrayLower1").ReportObjects("TrayDisclaimerLower1").SetText(strLower1) mReport.Sections("DisclaimerTrayLower2").ReportObjects("TrayDisclaimerLower2").SetText(strLower2) mReport.Sections("Footer").ReportObjects("TrayDisclaimerLower3").SetText(strLower3) End If
If inside the application, make sure it is referencing the V CR8 dlls and not the CR10 dll.