Forum Discussion
Paginated Report Subreport Visibility
- 9 months ago
Hi lipster26 ,
Thanks for reaching out to the Microsoft fabric community forum.If you hide a report item and its contents conditionally based on an expression … other report items to the right or below it move to fill in the space when the item is hidden.
please check the below document:
Render report items in Power BI paginated reports - Power BI | Microsoft Learn
Please find below the official Microsoft documentation on subreports in Paginated Reports. This guidance may help clarify how subreports are structured, as well as important considerations around visibility and rendering behavior.
Troubleshoot paginated report execution issues - Power BI | Microsoft Learn
https://learn.microsoft.com/en-us/power-bi/paginated-reports/subreports
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team
Hello,
Here are a few suggestions:
- Use an expression on the table row (Row Visibility)
This is what you are already doing, but you need to ensure that the expression returns True only when no data is to be displayed.- Example: =IIF(Fields!HasData.Value = False, True, False)
However, this is not always sufficient if the subreport is still being evaluated.
- Example: =IIF(Fields!HasData.Value = False, True, False)
- Using an expression in the subreport itself
In the subreport, you can add a visibility condition to the main object (e.g. a table or data region) so that it does not generate anything if the data is empty.
This prevents the subreport from generating empty content that takes up space. - Using an expression in the NoRows property of the subreport
You can define an empty message or a specific action when the subreport has no data
=IIF(CountRows("DataSetName") = 0, "", "empty sub-report") - Reduce the height of the line
If you cannot avoid generating the line, you can try reducing its height to a minimum (e.g. 0.1 cm) when it is hidden, to prevent it from causing a new page. - Use a rectangle around the subreport
Place the subreport in a rectangle, then apply the visibility expression to the rectangle rather than to the subreport or line. This can sometimes manage space better. Check page breaks
Ensure that:There are no page breaks defined on the row or table.
The sub-report does not have any before/after page breaks in its properties.
Please feel free to give a kudo and mark this as the answer if it helped you.
Have a nice day,
Vivien
I've tried all these options and still get a blank page. I've noticed that it is just the very last row that causes the blank page. If I hide other rows other than the last row with an expression, they work fine. I've also tried adding a blank dummy row after the real last row and it still creates a blank page.
- v-menakakota9 months agoCommunity Support
Hi lipster26 ,
Thanks for reaching out to the Microsoft fabric community forum.If you hide a report item and its contents conditionally based on an expression … other report items to the right or below it move to fill in the space when the item is hidden.
please check the below document:
Render report items in Power BI paginated reports - Power BI | Microsoft Learn
Please find below the official Microsoft documentation on subreports in Paginated Reports. This guidance may help clarify how subreports are structured, as well as important considerations around visibility and rendering behavior.
Troubleshoot paginated report execution issues - Power BI | Microsoft Learn
https://learn.microsoft.com/en-us/power-bi/paginated-reports/subreports
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team- v-menakakota9 months agoCommunity Support
Hi lipster26 ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
Best Regards,
Community Support Team- v-menakakota9 months agoCommunity Support
Hi @lipster26 ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
Best Regards,
Community Support Team