NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Report's Default Name

Hi All,

I'm using TS version 4.2.  I want to change the format of the .xml report file so that it doesn't contain the "[" and "]" but "_" (underscore) instead.  I also don't want the space between the hours, minutes, seconds, year, month, day.  How do I go about accomplishing this?

TIA for any help.

Vu

0 Kudos
Message 1 of 9
(4,004 Views)

In the Sequence Editor, go to the Configure menu and select Report Options. On the Report File Pathname tab, select "Specify Report File Path by Expression" in the "File Name/Directory Options" drop down. You can use TestStand's string functions to manipulate the auto-populated fields however you like.

0 Kudos
Message 2 of 9
(3,987 Views)

I got it to work.  Thank You!

0 Kudos
Message 3 of 9
(3,982 Views)

This is an excellent addition and much needed to TestStand. I however would like to take it one step further. I would like to specify the report name on the fly based on different modules being tested so I don't have to open reports to see what was tested but can tell by the report name itself. How would I accomplish that in TestStand 4.2? Thanks in advance for any help.

 

Troy

0 Kudos
Message 4 of 9
(3,895 Views)

I figured I might as well add this as well. What I am trying to accomplish is setting a report name by using some of my local variable values as well. So for example I have a test report that I want to look like this:

Test_Name_Local.FrequencyMHz.html

I have the Test_Name portion working on the fly. What I am having trouble with is getting the Local.Frequency to work which is a number. Also after Local.Frequency I would like to append the string MHz. This last part is what I need assistance with. Thanks again for any help.

 

Troy

0 Kudos
Message 5 of 9
(3,893 Views)

How are you setting Locals.Frequency? Post the report file expression you have so far.

0 Kudos
Message 6 of 9
(3,890 Views)

I have to apologize as I got a little ahead of myself. What I have so far is working. I do not want to change the test report name with every parameter of the test I am running, just the test name itself. Thanks for your reply.

 

Troy

0 Kudos
Message 7 of 9
(3,888 Views)

Hello,

 

"Hi All,

I'm using TS version 4.2.  I want to change the format of the .xml report file so that it doesn't contain the "[" and "]" but "_" (underscore) instead.  I also don't want the space between the hours, minutes, seconds, year, month, day.  How do I go about accomplishing this?"

 

I have the same question as the original OP about the brackets, but the version that we are using is 4.1 and the format of the report is TXT

 

I need to change the name of the report to this format:

MMDDYYYY_hhmmss_serial.txt

 

Reading the forum I have been able to get the file name to something like 06142011_100644_[987654321].txt, but now I need to know how to remove the brackets. Seems 4.1 does not have "Specify Report File Path by Expression".

0 Kudos
Message 8 of 9
(3,699 Views)

Hi all,

 

There is a step in the process model called 'Determine Report File Path" that calls the 'modelsupport2.dll.  It is located in the Main StepGroup of the SequentialModel.seq. 

 

It returns the value of report file path in Locals.ReportFilePath based on the options configured in the report options dialog ( serial number, date and time format ).

 

You could add two Expression steps after this step to SearchAndReplace all "]" and "[" with "_" as shown in the two expressions below. 

 

a.) Locals.ReportFilePath = SearchAndReplace(Locals.ReportFilePath,"]", "_", 0)

b.) Locals.ReportFilePath = SearchAndReplace(Locals.ReportFilePath,"[", "_", 0)

 

Give that a shot.

 

Thanks,

PH

 

 

0 Kudos
Message 9 of 9
(3,618 Views)