1 Reply Latest reply on Jan 27, 2016 8:35 AM by AlasdairC

    Object report template not honouring line breaks in multi-line text field

    Apprentice

      Hi folks

       

      I am trying to come up with a Report Template for our Change business object.

      On the object we have some non-HTML multi-line Text Attributes.

       

      Within one of the attributes we have a list of points, so when viewing the actual Change it appears as:

       

      1. Point one

      2. Point two

      3. Point three

       

      However, when viewing the attribute on the Report Template the line-breaks do not seem to be honoured and the text appears as:

       

      1. Point one 2. Point two 3. Point three

       

      Is there any way of getting the Report Template or will I have to make the multi-line text attributes on the business object HTML sub-type?

       

      Thanks.

       

      Alasdair.

        • 1. Re: Object report template not honouring line breaks in multi-line text field
          Apprentice

          I finally got time to go back to this, so for the people who looked, this was for a Description attribute on Change.

           

          All our descriptions are plain text so setting the Sub Type to HTML would have cross-module impacts.

           

          In the end I set up another attribute on Change with a Before Save calculation (Dependency on Description) and present that in the HTML Report overlay instead of the original plain text attribute.

           

          import System

          static def GetAttributeValue(Change):

                    Value = ''

                    if Change.Description != null:

                                Value = Change.Description.Replace('\n','<br>')

                    return Value

           

           

          Hope that helps anyone who hits something similar.