Skip to main content

Notifications

Announcements

No record found.

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 ;)

  • Community Member Profile Picture
    on at
    RE: How to hide certain content in a word-layout?

    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.  

  • Suggested answer
    JAngle Profile Picture
    63 on at
    RE: How to hide certain content in a word-layout?

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

  • Suggested answer
    Steven Renders Profile Picture
    5,397 Moderator on at
    RE: How to hide certain content in a word-layout?

    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.

  • Community Member Profile Picture
    on at
    RE: How to hide certain content in a word-layout?

    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,397 Moderator on at
    RE: How to hide certain content in a word-layout?

    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 ;-)

  • Suggested answer
    JAngle Profile Picture
    63 on at
    RE: How to hide certain content in a word-layout?

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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,923 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,788 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans