Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
I have tried deleting all of the records that would have been on the first 6 pages of the report and the error still occurs on page 3 and 4
and to make matters worse - if I do a search for something that's on page 3 or 4 I get the result and can then go to page 3 and 4 with no problems
I am using Visual Studios 2010 and these were originally 2008 reports that I let the wizard upgrade (note i have 20 something other reports that are fine and do not do this)
Hi M.R. - the server is SQL2008 R2 - but these are local reports I am working with in VS2010 (upgraded from 2008)
I haven't gotten TOO far with this problem - but I have figured out that it has something to do with a second matrix that's on the page - if I remove it the problem goes away - I know that's not much to go on, but I'm still digging :)
yes the data is pulled from a SQL Server, but it's during the local processing that the error occurs
and unfortunately No - I don't think "index" is referring to an index on a table - generally the "Index out of range" is talking about when you are trying to access an element in an array and it doesn't exists (like mystring[2] and mystring is empty or something
like that)
thanks for the idea though - I'll check to make sure my SPs are up to date
I'm getting the same error on a report I upgraded from VS2008 to VS2010/.NET 4/Viewer 10.0.
From what I read during my web searches, I think it has to do with one or more elements on the report that are screwed from the conversion. The stack trace for the reportviewer error has to do with rendering, not data.
So far, no luck fonding the culprit.
GeeksGoneBad
yes the data is pulled from a SQL Server, but it's during the local processing that the error occurs
and unfortunately No - I don't think "index" is referring to an index on a table - generally the "Index out of range" is talking about when you are trying to access an element in an array and it doesn't exists (like mystring[2] and mystring is empty or something
like that)
thanks for the idea though - I'll check to make sure my SPs are up to date
I made a new blank report, added datasources exactly as my original, modified my .aspx page reportviewer to use the new RDLC file, and started adding (copying) components of my original report a few at a time.
I could use most parts of my old report on the new one w/o problem. what I found was that I had several textboxes set to 'repeatwidh' a couple of tables. Out of desperation I removed the repeatwith settings and the report now works! I went back to the old
RDLC and removed the keepwith settings, and it works too.
Why? I don't know, but it may be worth trying for others who are getting that error.
I was getting the issue when i was merging two datasets in one & generating the new row ,with the total row count so it was gettng the error ,i was very stuck on that,, but some guided me ,
GeeksGoneBad
Member
129 Points
57 Posts
Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 03, 2012 08:06 PM|LINK
I am getting an error on page 3 and 4 of a report (the report is 27 pages long)
<div id="ctl00_cphMainContent_poProductList_poProductList_ReportViewer1_ctl10_NonReportContent" style="height: 100%; width: 100%;"> <div>I have tried deleting all of the records that would have been on the first 6 pages of the report and the error still occurs on page 3 and 4
and to make matters worse - if I do a search for something that's on page 3 or 4 I get the result and can then go to page 3 and 4 with no problems
I am using Visual Studios 2010 and these were originally 2008 reports that I let the wizard upgrade (note i have 20 something other reports that are fine and do not do this)
any ideas where I should start looking?
</div> </div>GeeksGoneBad
Member
129 Points
57 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 12, 2012 05:12 PM|LINK
Hey guys - I am still having this problem - does anyone have any ideas at all?
M.R.
Member
40 Points
23 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 18, 2012 02:35 PM|LINK
Can you please specify what edition of SQL Server are you using? (and what Service Pack)
GeeksGoneBad
Member
129 Points
57 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 18, 2012 02:50 PM|LINK
Hi M.R. - the server is SQL2008 R2 - but these are local reports I am working with in VS2010 (upgraded from 2008)
I haven't gotten TOO far with this problem - but I have figured out that it has something to do with a second matrix that's on the page - if I remove it the problem goes away - I know that's not much to go on, but I'm still digging :)
Thanks
M.R.
Member
40 Points
23 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 18, 2012 03:00 PM|LINK
But the data is pulled from the SQL Server database, am I right? And the index error refers to a database table index?
I was going to suggest to run the latest SQL Server 2008/Reporting Service 2008 service pack, i.e. SP3
Regards,
M.R.
GeeksGoneBad
Member
129 Points
57 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Jan 18, 2012 03:11 PM|LINK
yes the data is pulled from a SQL Server, but it's during the local processing that the error occurs
and unfortunately No - I don't think "index" is referring to an index on a table - generally the "Index out of range" is talking about when you are trying to access an element in an array and it doesn't exists (like mystring[2] and mystring is empty or something like that)
thanks for the idea though - I'll check to make sure my SPs are up to date
bkuhn
Member
16 Points
11 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Sep 13, 2012 06:22 PM|LINK
I'm getting the same error on a report I upgraded from VS2008 to VS2010/.NET 4/Viewer 10.0.
From what I read during my web searches, I think it has to do with one or more elements on the report that are screwed from the conversion. The stack trace for the reportviewer error has to do with rendering, not data.
So far, no luck fonding the culprit.
bkuhn
Member
16 Points
11 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Sep 17, 2012 09:04 PM|LINK
Followup.
I made a new blank report, added datasources exactly as my original, modified my .aspx page reportviewer to use the new RDLC file, and started adding (copying) components of my original report a few at a time.
I could use most parts of my old report on the new one w/o problem. what I found was that I had several textboxes set to 'repeatwidh' a couple of tables. Out of desperation I removed the repeatwith settings and the report now works! I went back to the old RDLC and removed the keepwith settings, and it works too.
Why? I don't know, but it may be worth trying for others who are getting that error.
GeeksGoneBad
Member
129 Points
57 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Sep 17, 2012 10:22 PM|LINK
Thanks! I will try that out tomorrow morning first thing!
waqar1
Member
118 Points
189 Posts
Re: Strange problem on Report - Index out of range on only two pages (3 and 4) of a report
Dec 07, 2012 08:24 AM|LINK
I was getting the issue when i was merging two datasets in one & generating the new row ,with the total row count so it was gettng the error ,i was very stuck on that,, but some guided me ,
check like this error if you have also.........