This is a migrated thread and some comments may be shown as answers.

Index out of range

5 Answers 271 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Aug 2011, 07:36 PM
Hi,

I'm currently using a report viewer to show different report. The list of report that can be show is in a comboBox. When I clicked on the button "preview", the reportViewer will show the selected item in the comboBox. I notice that if I click many times on the button preview when the report selected is the same, a error appears. Don't know if it is something wrong I'm doing or what, but here is the error that I received :

Server Error in '/' Application


Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.Generic.List`1.get_Item(Int32 index) +12732076
   Telerik.ReportViewer.WebForms.StreamManager.GetPageStream(Int32 index) +89
   Telerik.ReportViewer.WebForms.ReportPageOperation.WriteHtmlPage(StreamManager streamManager, Int32 pageIndex) +94
   Telerik.ReportViewer.WebForms.ReportPageOperation.WriteHtmlPage(Int32 pageIndex) +79
   Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperationOverride() +103
   Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager) +115
   Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +415
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +625
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270

Anyone know what it mean ? 
Thank you

David

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Aug 2011, 09:35 AM
Hi David,

We're aware of such a problem, but it happens in very specific case, which does not sound like the one you describe. That is why we would appreciate if you open a support ticket and attach a runnable sample project that exhibits the problem, so we can look into it locally.

Best wishes,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
David
Top achievements
Rank 1
answered on 12 Aug 2011, 02:34 PM
Hi Steve,

As you request, I send you a support ticket  (#453502). Don't know if I done it correctly, so just tell if you don't receive the support ticket

Thank you,
David
0
Accepted
Steve
Telerik team
answered on 15 Aug 2011, 03:00 PM
Hi David,

We've received your ticket and appreciate the sample project. We would do our best to address this for the upcoming service pack in a couple of weeks.

Kind regards,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
GlenB
Top achievements
Rank 1
answered on 27 Aug 2011, 04:38 AM
I was having the same issue with showing a report inside a tooltip. If I clicked on another tooltip to show the same report with different sourceID it would intermittently show the error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


My solution was to disable viewstate for the tooltip containing the report. Perhaps if you disable viewstate for the report 'container' it may help....
0
Fandy Backers
Top achievements
Rank 2
answered on 02 Dec 2011, 03:37 PM
Hi,

I was getting also such an error, but on a radgrid with grouping enabled.
I was not using LinQ, but a SQLconnection, so what i found out, is that when grouping is enabled it uses a LinQExpression, i think..
so i disabled it! adding EnableLinqExpressions="false" to the grid elements.

This solved it for me, maybe it can help you?

The problem didn't rise before until i updated my Controls from 2011.2.915.35 to 2011.3.1115.35!
just an update to get the newest skin.dll working.. and my grids with grouping didn't work anymore. It has to be a very small thing, but a big change?! ..

gr,

Fandy
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Steve
Telerik team
David
Top achievements
Rank 1
GlenB
Top achievements
Rank 1
Fandy Backers
Top achievements
Rank 2
Share this question
or