Skip to main content
We like to show the contents of interface messages in a previewer control.



I found out that this is possible with an expression field, with the formula like below and use a domain with control type HTML.



'

body {

font-family: Calibri, Tahoma, Arial;

font-size: 14px;

font-weight: bold;

}

' + REPLACE(REPLACE(REPLACE(t1.message_body, '<', '<'), '>', '>'), CHAR(10), '

') + '

'



It is nice, but it does not fully give the desired output.



Any suggestions?
Hi Harm,



I suppose you are trying to get rid of HTML control characters in the XML?



Instead of the replaces, you can try to use the XML formatter in SQL Server to escape the characters:



code:
(select t1.message_body as 
  • for xml path(''))

  • Hi Anne,



    Thanks for your reply.



    In this case the purpose is a technical screen, not for regular end users.



    I like to see the actual XML data, like when you open an XML file in NotePad, Notepad++. If possible with language specific formatting.



    The same for TXT, JSON, SQL etc.



    I hope you see a solution.



    Br,



    Harm
    Which GUI platforms are we talking about? The Windows GUI does have a code editor available that can highlight various programming languages.
    For now, the Windows Gui.



    I will try your suggestion, but prefer using the document previewer because it uses all available space.



    A combination of both would be ideal.

    Reply