SSRS and the Case of the Out-of-Order Report Tables


In this post, Senior Application Development Manager, Patrick King shares a SSRS tip to help control report item order when it differs from what you may see in VS designer.


imageI recently worked with a customer developing a SQL Server Reporting Services (SSRS) report that was rendering in a different order than what appeared in the designer in Visual Studio 2013.

The report designer had three tables that were arranged sequentially, similar to those shown below:

clip_image002

When rendered in the designer preview, the tables were out of order, as shown here:

clip_image004

And when exported to PDF, one table was superimposed upon the others, like this:

clip_image006

After reviewing the designer, nothing stood out as being incorrect. My next step was to review the xml content of the RDL file.

Inspecting the RDL file revealed a rectangle that contained tablix2 and tablix3. In the designer, that same rectangle visually appeared to contain all three tables, but Tablix1 was just positioned on top of the rectangle. This caused layout conflicts when rendering the report, because the rectangle and Tablix1 were peers that occupied overlapping space.image

clip_image008

Issues like this seem simple in hindsight, but can cause hours of frustration when a developer is struggling to understand what is going on.  The issue was resolved by moving the rectangle start element so that it encompassed Tablix1 to match the original intent. Once this was done, the report rendered as expected.


Premier Support for Developers provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality.  Contact your Application Development Manager (ADM) or email us to learn more about what we can do for you.

Comments (2)

  1. Alex Thomas says:

    Please could you provide more detail on what was moved to where exactly, and whether this was done by manually editing the RDL’s XML or by using the IDE. Thanks

    1. I moved the start elements for Rectangle1 and it’s child ReportItems up in the file to just before Tablix1, so that all three Tablix members were contained within the rectangle.
      I edited this directly in the XML, using Visual Studio. One way to get to the XML is by right-clicking the report definition in Solution Explorer and selecting View Code.

Skip to main content