System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-02-2006, 3:35 AM
Hi, one of my report sometimes raises this error:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at DataDynamics.ActiveReports.Viewer.-bc1e.-ffbe()
   at DataDynamics.ActiveReports.Viewer.-1cde.-fcbf()
   at DataDynamics.ActiveReports.Viewer.-beca.-f0d1()

The fact is that this seems to be a random error, I try to handle the error with "Try Catch" but I can't find the problem. I know it will be quite difficult for you to give me an answer since I don't give you enough details, but I just want to know what does "-bc1e.-ffbe()" (and "-1cde.-fcbf()" and "-beca.-f0d1()") mean.

Thanks a lot

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-02-2006, 4:37 PM

Each build is obfuscated. Every time that our development team does a build we produce XML maps which acts as a decoding tool that we can use internally. I tried to look up which methods were being referenced above using the XML maps for the 1205 build and could not find them. Are you sure that you are running the 1205 build?

As far as the System.OutOfRange exception is concerned. Make sure that you are not violating any of the following design rules: http://www.datadynamics.com/forums/78647/ShowPost.aspx.

 

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-03-2006, 3:24 AM
Hi, I just checked and we use the 1205 build, but it seems that the error code I gave you actually concerned an older version.

Now the error is:

   at DataDynamics.ActiveReports.Viewer.-ca1b.-e123()
   at DataDynamics.ActiveReports.Viewer.-eb3c.-b1cd()
   at DataDynamics.ActiveReports.Viewer.-3ada.-cbe3()

Thanks

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-06-2006, 10:19 AM

It looks like this problem is occuring within the UpdatePages method of the viewer. I can not tell you exactly what the problem is however. One possibility may be related to manipulating the current page of the viewer control. If perhaps you are setting the current page to an index which does not exist in the pages collection. Hopefully this will point you in the right direction. If you can put together a simple run-able sample which reproduces the problem consistently, I can most likely track the problem down.

Thanks, 

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-06-2006, 10:40 AM
That's my problem : this is a random error. The same report may or may not raise the error. Actually, a user call me, show me the error, we quit the program, re-start it, we do exactly the same thing, with no change at all, and the report works. Or not. And I look in my code but it seems that I don't manipulate any page...

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-13-2006, 11:32 AM
Hi, I think I got the thing... it's a little bit tricky... (and quite difficult for me to explain)

In my program, I have a datagrid. When a user doubleclick a row, it opens the report. The fact is that we are in a terminal-server architecture, and sometimes the program is slower than usual, and it happens that the user, impatient, doubleclick again. But the first doubleclick already launch the report, and the second doubleclick actually click on the viewer, which is not "ready"...

So to fix that in my form.load (the form which contains the viewer) I start with MyViewer.Enabled = False and end with MyViewer.Enabled = True and I create and run my report between those two statements. And it looks like it works...

'hope you'll understand...

Re: System.IndexOutOfRangeException: Index was outside the bounds of the array.


02-14-2006, 12:51 PM
That makes sense to me, the first report wouldn't have anywhere to be loaded when the second report was already loaded. Thanks for posting your fix.

brandon.
webmaster. -DD