I have upgraded a rdl file from 2005 to 2012 using visual studio 2012 ultimate and I am getting an error that I did not receive in the 2005 version. The error is:
Index was out of range. Must be non-negative and less than the size
of the collection. Parameter Name: Index
First - the RDL file does not have a parameter called "Index".
Second - I only get the error when the queried data set has no rows. For example, the report has a code parameter the user selects from a drop down. Code 661 and 663 return data sets with several hundred rows. However, 662 returns an empty data set and I receive the error.
Third - My 2005 version of this report displays a blank page with no data (the desired result) when 662 or other empty data sets are run. No errors occur in the old version and it is pointing to the same data set as the newly converted version.
I believe the culprit is the Tablix object that adds columns when rendering with a query that returns rows.
Has anyone experienced this issue when upgrading rdl files and is there a way to trouble shoot or work around the problem?
My code for one of my Tablix objects is below
<Tablix Name="matrix3">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Tablix Name="matrix4">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="textbox18">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<ZIndex>3</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>0.59375in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.39773in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="textbox19">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix4_ColumnGroup1">
<GroupExpressions>
<GroupExpression />
</GroupExpressions>
</Group>
<TablixHeader>
<Size>0.23864in</Size>
<CellContents>
<Textbox Name="textbox17">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<ZIndex>2</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix4_RowGroup1">
<GroupExpressions>
<GroupExpression />
</GroupExpressions>
</Group>
<TablixHeader>
<Size>1.78125in</Size>
<CellContents>
<Textbox Name="textbox16">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontWeight>Bold</FontWeight>
<TextDecoration>Underline</TextDecoration>
<Color>RoyalBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<RepeatRowHeaders>true</RepeatRowHeaders>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Tablix>