Forum Discussion
RTL Matrix Expansion Issue in SSRS
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)
Hi Oussama,
Thanks for the great explanation. Here are the specific XML sections you requested from my RDL file:
1. The <Tablix> Opening Tag, Location, and Size:
<Tablix Name="Tablix4">
<Top>0cm</Top>
<Left>18.59796cm</Left>
<Height>20.48624cm</Height>
<Width>7.10204cm</Width>
<LayoutDirection>RTL</LayoutDirection>
2. My Column Groups Structure (<TablixColumnHierarchy>):
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>4.59808cm</Size>
</TablixHeader>
</TablixMember>
<TablixMember>
<Group Name="EntityTypeOrder2">
<GroupExpressions>
<GroupExpression>=Fields!EntityTypeOrder.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!EntityTypeOrder.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.7205cm</Size>
</TablixHeader>
<TablixMembers>
<TablixMember>
<Group Name="EntityDisplayName2">
<GroupExpressions>
<GroupExpression>=Fields!EntityDisplayName.Value</GroupExpression>
</GroupExpressions>
</Group>
<TablixHeader>
<Size>3.87758cm</Size>
</TablixHeader>
<TablixMembers>
<TablixMember />
</TablixMembers>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>3.87758cm</Size>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
3. The <Body><Width> and <Page> block:
<Style>
<Border>
<Style>None</Style>
</Border>
<Direction>RTL</Direction>
</Style>
</Body>
<Width>25.7cm</Width>
<Page>
<PageWidth>29.7cm</PageWidth>
<PageHeight>21cm</PageHeight>
<LeftMargin>2cm</LeftMargin>
<RightMargin>2cm</RightMargin>
<TopMargin>0.5cm</TopMargin>
<BottomMargin>0.5cm</BottomMargin>
<ColumnSpacing>0.13cm</ColumnSpacing>
<Style />
</Page>Based on your previous guidance, I have already adjusted the Body <Width> to 25.7cm and recalculated the Tablix <Left> property to 18.59796cm (25.7cm body width minus 7.10204cm tablix width) to align it to the far right.
I am currently using SSRS 2016, and I have more than 30 other reports that rely on this exact same dynamic matrix layout mechanism. Understanding this alignment logic is a huge lifesaver for my project! Could you please double-check these properties and confirm if my math and approach are fully correct before I replicate this fix across the rest of my reports?
Best regards,