web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to hide certain content in a word-layout?

(0) ShareShare
ReportReport
Posted on by

Hello guys,

is there a possibility to hide areas in word layout?

For example, I would like to control via a certain flag that a second page may only be printed if the flag = True.

Thank you ;)

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    150 on at

    Via word this is not likely. The logic would have to be in the report code. Rdlc is a better fit here

  • Suggested answer
    Steven Renders Profile Picture
    5,682 Moderator on at

    To my knowledge that is not possible in the Word layout, only the RDLC layout allows for scripting. 

    As an alternative you could create 2 word layouts and use AL code to use the one or the other depending on the flag. But that seems like a cumbersome solution in comparison with the RDLC layout ;-)

  • Community Member Profile Picture
    on at

    I had this idea too, but I don't know how to call the two layouts then.

    I have created the word layouts and they also work, now it fails somehow beacuse of their call. I know that there are many different setup pages, but there I can always only choose a report with the exact ID. Like for example in the setup page for reminders.

    Do you know, how to to call a "layout", depending on a special flag?

  • Suggested answer
    Steven Renders Profile Picture
    5,682 Moderator on at

    Yes, but it is something that you will need to program in AL, it is not possible out of the box.

    There's a function SetTempLayoutSelected in the ReportLayoutSelection table that allows you to change the layout on a report.

  • Suggested answer
    JAngle Profile Picture
    150 on at

    This video explains it well. Plus you can get the source code from GitHub: www.youtube.com/watch

  • Community Member Profile Picture
    on at

    Thank you for your ideas. You have helped me a lot with this!

    I have another question:

    The two layouts, which I have created, do I need for my reminders. Do you think that the change of the layouts will also be possible if I also want to print on the RequestPage in the filter "No." several reminders?

    I am afraid that this might not work. However, I work with dunning runs and sometimes dun 1000 customers per month. Therefore, the layouts have to to changed automatically. I have a flag that makes clear which layout should be used. This flag is a boolean field on the Issued Reminder Header.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,055 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,014 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans