NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does a string looks different for .xml, .html and .pdf Reports?

When running a simple test in TS 2022, I do have following string printed to the report:

 

"30" + "°C | "

 

When the test is done,

in the html report is showing like this: 

"30°C | "          (OK)

 

in the xml report the same string looks like this:

"-30°C | "          (not OK)

 

in the pdf report the same string looks like this:

"-30°C | "       (not OK)

 

 

How it comes that I see those differences and what is the workaround?

Message 1 of 17
(2,068 Views)

nobody any idea...?

0 Kudos
Message 2 of 17
(2,026 Views)

Hi Norick17,

According to this article's information and as a result of searching the (.xml) and (pdf) report types accepting some characters as an entity.
In this case
  is non-breaking space " ". A non-breaking space is a space that will not break into a new line. Note that you have a space between "C" and "|". 
 is a ' character which is appearing as entity which is  in this case.

To avoid this report types of difference, you should use HTML report type, which is appearing properly in your side.


Regards)

0 Kudos
Message 3 of 17
(2,004 Views)

Thanks for your reply and explination. In my case I do need a .pdf report so I can not simply switch to html although it would solve it. I assume there must be a way to avoid it when adding some "special" char in front of a non-breaking space " " in order to get only a space or a setting in TS.

 

Otherwise a pdf report would not make much sense.

0 Kudos
Message 4 of 17
(1,988 Views)

If you need pdf format, then you should write your constant strings in appropriate format. There are articles which can help you modify you strings constants, I have attached them below. 

Match Regular Expression Function - NI

Backslash ('\') Codes Display - NI

 

For example, a plus sign or a minus sign should be written as [+-] and etc. 


Regards)

 

0 Kudos
Message 5 of 17
(1,975 Views)

@l.hovs wrote:

If you need pdf format, then you should write your constant strings in appropriate format. There are articles which can help you modify you strings constants, I have attached them below. 

Match Regular Expression Function - NI

Backslash ('\') Codes Display - NI

 

For example, a plus sign or a minus sign should be written as [+-] and etc. 


Regards)

 


Ok but for example [+-] is used when searching "+-" strings in LabView for example, which is not exactly the problem I have. In other words how would you write "30" + "°C | "

 

in TestStand in order to get the same string in a pdf-file?

0 Kudos
Message 6 of 17
(1,952 Views)

Could you please provide me the screenshots of Report option window to check something is missing or not, because after testing it in my side it worked without any issues. 


Regards) 

0 Kudos
Message 7 of 17
(1,930 Views)

report.png

0 Kudos
Message 8 of 17
(1,916 Views)

In my side with these settings everything is working properly. Also,I thought that it is a version problem, but I tried to install TestStand 2022 64x version to test it and of course this one worked as well. 

 

What I think is that the problem comes from your program, and how you are adding an additional result to the report.

How actually you are trying to report that string? 

 

I have attached the PDF report screenshot below. 

lhovs_0-1682610148724.png

 


Regards)

 

0 Kudos
Message 9 of 17
(1,907 Views)

 


@l.hovs wrote:

In my side with these settings everything is working properly. Also,I thought that it is a version problem, but I tried to install TestStand 2022 64x version to test it and of course this one worked as well. 

 

What I think is that the problem comes from your program, and how you are adding an additional result to the report.

How actually you are trying to report that string? 

 

I have attached the PDF report screenshot below. 

lhovs_0-1682610148724.png

 


Regards)

 


 

I do have in the callback PreUUT following two functional expressions:

 

1) Write all temperatures like: 20°C | 30°C | etc..

Locals.Temperatures = Locals.Temperatures + "30" + "°C | " 

 

 

2) Show those termperatures in the report

Parameters.UUT.AdditionalData.SetValString("Climachamber.Temperatures",1, Locals.Temperatures),

 

 

That's all. I am also wondering why it works on your side...

0 Kudos
Message 10 of 17
(1,876 Views)