Forum Discussion

Ayman_Hezam's avatar
Ayman_Hezam
Regular Visitor
3 months ago

RTL Matrix Expansion Issue in SSRS

"Hi there! I'm facing a tricky issue with an SSRS Matrix. I'm using Report Builder (version 15.0.200) with SQL Server 2016.

The problem is that even though I set the Matrix Direction to RTL, the columns still expand to the right (like LTR) instead of expanding to the left. This causes the table to grow outside the report page.

I checked the Report Body and Report Properties to set them to RTL, but the 'Direction' property is completely missing from the properties pane (I only see Border, Fill, and Position).

Is there a way to force the RTL behavior?

12 Replies

    • Ayman_Hezam's avatar
      Ayman_Hezam
      Regular Visitor

      Hi v-saisrao-msft,

      Thank you for following up.

      I have reviewed the solution shared earlier by oussamahaimoud, but unfortunately the issue still persists. The matrix continues to expand off-page even after applying the suggested RTL settings.

      Root Cause (as identified): SQL Server 2016's Report Builder has a bug/limitation where setting LayoutDirection = RTL on the Tablix alone is not sufficient. The matrix columns still physically expand to the right because the report body itself does not have a true RTL container. The missing "Direction" property in the Report Body is a known UI gap in version 15.0.200.

      Even after updating Report Builder to version 15.1.30001.02, the problem remains unresolved.

      I hope Microsoft can provide an official fix or workaround for this limitation.

      Best regards, Ayman Hezam

  • Hi Ayman_Hezam,

    Hope you're doing well!

     

    By looking at your screenshots, I can clearly see the issue. Your matrix is expanding to the right and going off-page, even though you've set the Tablix direction to RTL. This is a known limitation in SSRS/Report Builder, and here's how to fix it properly.

     

    --> Root Cause :

    SQL Server 2016's Report Builder has a bug/limitation where setting LayoutDirection = RTL on the Tablix alone is not enough. The matrix columns still physically expand to the right because the report body itself doesn't have a true RTL container. The "Direction" property missing from the Report Body is also a known UI gap in version 15.0.200.

     

    --> Solution :

    You should edit the RDL XML directly by doing it step by step :

    1. Close Report Builder

    2. Open your .rdl file with Notepad or VS Code

    3. Find the <Report> tag near the top and add this if it's missing:

    xml
    <Language>ar-SA</Language>
    <Direction>RTL</Direction>

    4. Also find your <Tablix> element and make sure it has:

     
    xml
    <LayoutDirection>RTL</LayoutDirection>

    5. Then find your <Body> tag and add:

    xml
    <Style>
      <Direction>RTL</Direction>
    </Style>

    6. Save and reopen in Report Builder.

     

    Hope this helps. Feel free to ask me questions if needed, and don’t forget to give kudos (likes)Accept as Solution if this guidance worked for you. That's motivate me to keep helping.

     

    Best regards,

    Oussama (Data Consultant & Fabric's Expert)

    • Ayman_Hezam's avatar
      Ayman_Hezam
      Regular Visitor

      Hi Oussama,

      Thanks again for your support. I’ve followed your steps carefully and here’s the outcome:

      • The <Language>ar-SA</Language> tag was added successfully under <Report>.

      • When I tried adding <Direction>RTL</Direction> under <Report>, Report Builder refused to open the file and showed the following error: “The report definition element 'Report' contains an invalid child element 'Direction' in namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition'. Expected elements: Description, Author, AutoRefresh, InitialPageName, DataSources, DataSets, ReportParameters, ReportParametersLayout, Code, EmbeddedImages, Language, CodeModules, Classes, CustomProperties, Variables, DeferVariableEvaluation, ConsumeContainerWhitespace, DataTransform, DataSchema, DataElementName, DataElementStyle, ReportSections.”

      • The <LayoutDirection>RTL</LayoutDirection> tag is already present in my Tablix (I had added it earlier).

      • I also added <Style><Direction>RTL</Direction></Style> under <Body>, but the matrix still expands off-page and the issue remains unresolved.

      I will attach the RDL file so you can review the structure directly and advise on the correct placement or alternative properties (e.g., WritingMode/TextAlign) that are supported in this schema.

      https://drive.google.com/file/d/14EO-3b4-rguPuPJbFOWus0pQEylid7vp/view?usp=sharing

      Best regards, Ayman

      • oussamahaimoud's avatar
        oussamahaimoud
        Memorable Member

        Hi Ayman_Hezam,

         

        Thanks for testing each step carefully and sharing the exact error message, that's really helpful!

        You're right, I apologize for that. The <Direction> tag directly under <Report> is not valid in the 2016 RDL schema, and the error message you got confirms this perfectly. That was my mistake.

         

        Regarding your reply, we know now that the issue is not about missing RTL tag, it's about how SSRS 2016 physically renders dynamic column groups. The columns will always expand to the right regardless of direction settings, which is a rendering engine limitation.

         

        Since your column groups are dynamic (driven by EntityTypeOrder2 and EntityDisplayName2 as seen in your screenshots), here's what you should do:

         

        1. Fix the matrix position in the RDL :

        Open your RDL file in Notepad and find your Tablix <Top> and <Left> values inside <TablixLocation> or the Style block, and move the matrix to start from the far right of the body so new columns push leftward visually.

         

        2. Reduce the body width :

        In the RDL XML, find:

        <ReportSections>
        <ReportSection>
        <Body>
        <Width>

        And make sure the Body width equals exactly your page width minus margins. A body wider than the printable area is often the hidden culprit.

         

        For a standard A4 landscape with 2cm margins:

        <Page>
        <PageWidth>29.7cm</PageWidth>
        <PageHeight>21cm</PageHeight>
        <LeftMargin>2cm</LeftMargin>
        <RightMargin>2cm</RightMargin>
        </Page>

        So your body width should be 25.7cm maximum.

         

        3. paste the relevant XML sections

        I'm not able to open external URLs or download files, so I can't review your RDL directly. However, I'd suggest you paste the relevant XML sections here, specifically:

         

        • The <Page> block
        • The <Body><Width> value
        • The <Tablix> opening tag with its Location/Size
        • Your Column Groups structure

         

        This way I can pinpoint exactly where the overflow is happening and give you a precise fix rather than general guidance. So, I think you're very close to solving this because the structure is right, it's just a positioning and page sizing issue at this point!

         

        Hope this helps. Feel free to ask me questions if needed, and don’t forget to Accept as Solution if this guidance worked for you. That's motivate me to keep helping.

         

        Best regards,

        Oussama (Data Consultant & Fabric's Expert)