web
You’re offline. This is a read only version of the page.
close
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...
Answered

Word Custom Report Layout Formatting Issue

(0) ShareShare
ReportReport
Posted on by 141

Hello,

We are formatting a Word document and uploading it to the Custom Report Layout. 

When we then apply some AL code on this document, to hide some data based on its condition, the formatting goes back to default and left aligns all the columns. 

We then re-upload the template which corrects the formatting but loses the AL formatting. 

In AL we are trying to hide the 0% on comment lines, and on Item lines where there is a 0%, show NETT instead. 

Layout.png_2D00_640x480.png

Is there a solution for this? 

I have the same question (0)
  • Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi,

    Are you previewing this from Custom Layout? Or direct from order page?

    Thanks.

  • GazzR Profile Picture
    141 on at

    From the Order Page

  • GazzR Profile Picture
    141 on at

    pastedimage1665041077765v1.png

    Example of the difference in formatting after applying some formatting in AL. 

  • Nitin Verma Profile Picture
    21,708 Moderator on at

    Ok,

    Please go to the Report Layout > Choose New layout and do as per below image.

    pastedimage1665041387954v1.png

    After filling this Click on Replace Layout and choose your custom Layout, and then Make that as default layout and then run the report again from the Order page.

    Hope it will resolve your issue.

    Thanks.

  • GazzR Profile Picture
    141 on at

    Thanks for the suggestion, but it hasn't made any difference.

  • Verified answer
    sVerme Profile Picture
    120 on at

    Hiding the value should be done in your AL-code. Check if the line is of type comment, and give it a value of ''. 

    for the alignment of the fields. This is a bug in Word, when you open the document it loses the alignment of fields in a table. 
    the value of the align gets removed from the XML for some reason. 


    You have to align them to the right again every time you open the document. 

    EDIT:
    You could try adding a nonbreaking space before your XML item in your table. 
    Sometimes this helps to stop it from losing its alignment.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans