I've encountered a strange thing, when looking at the standard Mini Sales Header Reports of NAV 2016 (reports 1304,...,1307, 1316). For example in the word layout of report 1304 "Mini Sales - Quote", the columns Quantity_Line, VATPct_Line, etc. all appear right aligned, when printed, but in the word layout itself, I cannot find, where or how this right alignment is defined. Quite the contrary, all controls, paragraphs, table columns, etc. for these fields seem to be left aligned...(!) - can anyone give me a hint, please!
0
Answers
The supplied Wordlayout for the miniform reports may have been designed with another tool (except word) or another (older) version of Word.
In order to right align table cells containing plain text content controls, you should put a non-breaking space (Ctrl+Shift+Space) before the plain text control. Then any format supplied to the table cell's content will be retained upon saving and reopening.
The w:jc element disappears when Word reads the document, not when it's saved. The templates you mention are saved with Word, Office 2013 or 2016. The alignment in the final report are based on the column type. If you have a table that includes data of type decimal (in the report dataset), we will automatically right align this column IF no alignment has been specified on the column. A missing w:jc element equivalents to left alignment (the default) and Word does not save default values to the documents.
Niels-Henrik Sejthen
Senior Software Developer
Microsoft Dynamics NAV
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Thank you very much.
Is there any further documentation available about the DocumentReport AddIn and especially what all happens when the MergeWordDocument function is called in Codeunit 9651?
The Wordlayout consists of a repeated table row with 3 columns. There is no formatting. The last two columns are of type decimal:
Here is the result:
You are absolutely right, this is not always working in nav 2016. It was fixed in nav 2017, but the fix did not get backported, I have tested your setup in nav 2016 and 2017 and can confirm that its working fine in 2017 and fails in 2016. I will see if I can get this fix and a fix on image scaling backported to nav 2016 for the next CU.
The problem with the alignment was that the alignment property did not get inserted if the property element on the cells paragraph element was missing. Notice that the right alignment will only be active if no alignment has been defined for the cell, following the principle that the renderer should only override settings if they are not explicitly defined.
PS: Sorry for the long delay in feedback, but I don't follow mibuso forums on a regular basis due to time constraints.
Niels-Henrik Sejthen
Senior Software Developer
Microsoft Dynamics NAV
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Cancel my question. ctrl + shift + space to retain the alignment