Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Vegar
MVP
MVP

How to display \n as '\n' in a QlikView text object

I am trying to present a server name '\\nprinting001' in a QlikView text object, but no matter how I try the '\n' will always be displayed as a line break. My string '\\nprinting001' gets displayed as in the picture of my yellow text object below.

Vegar_0-1586898582422.png

 

The only workaround I found is to transform my text to upper case as in the image below.

Vegar_1-1586898653885.png

  1. I'm using QlikView  April 2019, can you guys confirm that this is the behaviour in earlier releases of QlikView as well?
  2. Do you now an other workaround where I will be able to present my server name in lower case?
  3. Are there other special sting combination that do not display properly in a QlikView text object?

(I'm attaching a QlikView document demonstrating my issue)

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

I think it's a special parsing "feature" … and I don't know a direct way to cure it because it didn't add a "real" line-break which you could see if you copies the content to notepad++ and therefore the "classical" tries with combining pieces, replacing the line-break again, doubling the logic with \\\nn... and similar approaches didn't work.

A workaround could be to add a zero white-space or something similar, like:

= '\\' & chr(8203) & 'nprinting'

to bypass this feature.

- Marcus

View solution in original post

4 Replies
marcus_sommer

I think it's a special parsing "feature" … and I don't know a direct way to cure it because it didn't add a "real" line-break which you could see if you copies the content to notepad++ and therefore the "classical" tries with combining pieces, replacing the line-break again, doubling the logic with \\\nn... and similar approaches didn't work.

A workaround could be to add a zero white-space or something similar, like:

= '\\' & chr(8203) & 'nprinting'

to bypass this feature.

- Marcus

Vegar
MVP
MVP
Author

Thanks @marcus_sommer .  

It's not pretty but it will works  as a display. (Copying back into a exporer adress field will most likely fail) 

LET vL.servername = replace('\\nprinting001\', '\n', '\'& chr(8203) &'n');

Vegar_0-1586939476592.png

 

marcus_sommer

Another approach might be to use a straight table or maybe another chart  or a button instead of the textbox - in most of them the string \\nprinting will natively work whereby it may bring other disadvantages in regard to the specific object-properties but it may worth an attempt.

- Marcus

Vegar
MVP
MVP
Author

Yes you are correct. The imput box in my example app are rendering the variable correctly and a chart object will do so as well.