posted on Thursday, March 09, 2006 3:49 PM by dfaceved

Reporting Services Therapy: Index was out of range

I got this strange error when exporting to Excel from the designer or from the Report Manager:
"Index was out of range. Must be non-negative and less than the size of the collection."

After pulling my hair out for a while, and after Googling the problem, I found a couple of solutions, (1) Worked for me - it came from my Salt Lake City coworker:

(1) One Detail Cell in my table contained a number like #.#########. Aparently this freaked out Excel. I converted it to a string like this:
=Convert.ToString(Format((ReportItems!ValueOne.Value / ReportItems!ValueTwo.Value), "#.#########"))

(2) As per this blog, disabling the Document Map Labels has the same effect and cures the problem.

Comments