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,
- oussamahaimoud3 months agoMemorable Member
Hi Ayman_Hezam,
Great news, your math and approach seems OK!
But, before walking through the confirmation so you feel confident before replicating this across your 30+ reports, please, Accept as Solution my last reply. That's motivate me to keep helping.
- Ayman_Hezam3 months agoRegular Visitor
Thank you so much! I will absolutely mark your reply as the accepted solution as soon as we quickly review the confirmation and ensure this completely resolves the direction and expansion issue. I just want to be 100% sure before replicating it across all 30+ reports. Looking forward to your guidance!
- oussamahaimoud3 months agoMemorable Member
Hi Ayman_Hezam,
You should watch one important thing :
Since your column groups are dynamic (EntityTypeOrder and EntityDisplayName), the number of columns at runtime is unpredictable. This means even with perfect positioning, if enough columns are generated, the matrix will still eventually overflow to the left and go off-page.
To protect yourself, keep this formula in mind for every report:
Safe Tablix Left = Body Width − Initial Tablix WidthMaximum Safe Columns = Body Width ÷ Average Column Width
In your case, with an average column width of roughly 0.72cm, you can safely fit around 35 dynamic columns before hitting the left margin.
Regarding duplicate +30 reports and before applying to each report, verify these four values every time:
Property What to Check<PageWidth> Is it consistent? (29.7cm for A4 landscape) <LeftMargin> + <RightMargin> Same margins across all reports? <Body><Width> Must equal PageWidth − both margins <Tablix Left> Must equal Body Width − Tablix Width Finally, you are safe to replicate this pattern across your other reports.