Wordlayout Mini Sales Header - Alignment of Decimal Fields

gerdhuebnergerdhuebner Member Posts: 155
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!

Best Answers

Answers

  • gerdhuebnergerdhuebner Member Posts: 155
    @nhsejth
    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?
  • gerdhuebnergerdhuebner Member Posts: 155
    nhsejth wrote: »
    Hi,
    ...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...
    Well, I tried this with a simple report layout and it does not work.
    uokde3yz3mu2.png
    The Wordlayout consists of a repeated table row with 3 columns. There is no formatting. The last two columns are of type decimal:
    v2j24xnjtbbu.png
    Here is the result:
    mnns03y71tdx.png

  • nhsejthnhsejth Member, Microsoft Employee Posts: 34
    @gerdhuebner,
    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.
    <w:p w:rsidR="001F1DFA" w:rsidP="00AC7DCE" w:rsidRDefault="001F1DFA">
      <w:pPr>
        <w:jc w:val="right" />
       </w:pPr>
        <w:r>
          <w:rPr>
            <w:lang w:val="da-DK" />
          </w:rPr>
          <w:t>5</w:t>
        </w:r>
     </w:p>
    
    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.
  • sVermesVerme Member Posts: 2
    edited 2021-12-10
    EDIT:

    Cancel my question. ctrl + shift + space to retain the alignment
Sign In or Register to comment.