views:

185

answers:

2

I have been creating rdlc reports from scratch using C# to write xml files. To make sure I do this properly I look at the XML behind other reports I created using the VS 2008 report designer feature. When I look at the XML for the reports created using VS, I see the field called ZIndex which as a integer value associated with it. What is the importance of this field? Below you will see that the ZIndex value is 238.

Example:

                   <Textbox Name="FULL_NAME">
                      <rd:DefaultName>FULL_NAME</rd:DefaultName>
                      <Style>
                        <FontSize>8pt</FontSize>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>238</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>=Fields!FULL_NAME.Value</Value>
                    </Textbox>
A: 

Not sure if it's totally true in this case, but ZIndex usually means the order things would appear in when you had several elements one on top of the other (overlapping).

Jim Leonardo
A: 

I was able to find the 2008 rdlc spec provided by Microsoft at the MSDN website.

The specification provided by Microsoft says that the ZIndex refers to the order that an item will be rendered in. The rendering order is from lowest to highest. The minimum is 0 and the maximum is 2147483647. In the case where two numbers are identical the redering order is not predictable. One object can be rendered on top of another by giving it a higher ZIndex number.

Here is the link:

http://www.microsoft.com/sqlserver/2008/en/us/reporting.aspx
JK