From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to edit "Station ID" to "Test Bench ID" name in HTML Report (TestStand 4.2)...?

Hi Folks,

 

I have regular HTML report from TestStand 4.2; particularly i want to change the header from "Station ID" name to "Test Bench ID" name.

 

Can anyone help me on this...?

 

Thanks for your help...!!!

SB_LV

 

0 Kudos
Message 1 of 12
(6,382 Views)

Here are just 3 options:

 

1- Probably the easiest and best option.  Open this file: C:\Program Files\National Instruments\TestStand 4.2\Components\Language\English\ModelStrings.ini.  Search for RPT_HEADER_STATION_ID.  Replace the Station ID in the quotes with Test Bench ID:. The ModelStrings.ini is a resource strings file that contains a bunch of basically "global values" that TS references. 

 

2- If you don't want to change your resource strings then open this sequence file: C:\Program Files\National Instruments\TestStand 4.2\Components\Models\TestStandModels\reportgen_html.seq.  Open the sequence in there titled- AddReportHeader.  Find the step named- Add Station ID.  It should be a statement step.  In the Expression replace ResStr("MODEL", "RPT_HEADER_STATION_ID") with "Test Bench ID:".  This directly edits your process model and every sequence ran on the machine will see the change.

 

3- Add the Modify Report Header callback to your sequence file.  In there you will have ot search the Parameters.ReportHeader string for Station ID: and replace it with Test Bench ID.  This will not affect the process model. 

 

Hope that helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 12
(6,373 Views)

Hi Jigg,

 

Thanks for the reply.

 

I'd like to go for the 3rd option. Where do i get the "Modify Report Header" call back sequence...? Can you provide me the location...?

 

Thanks for the Help...!!!

SB_LV

0 Kudos
Message 3 of 12
(6,366 Views)

Open the Sequence File you want to add the callback to.

 

Edit>>Sequence File Callbacks.  Then click on ModifyReportHeader.  Click Add.  Click OK. 

 

Now you should see a green sequence in your file called ModifyReportHeader.  Open it and add a statement step.  Put the following in as the Expression:

Replace(Parameters.ReportHeader, Find(Parameters.ReportHeader, "Station ID",0,False, False), 10, "Test Bench ID")

 

That should do the trick.  You can play with that however you'd like as you can see. 

 

Most callbacks in TS have parameters that you can modify.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 12
(6,364 Views)

One more thing:  make sure On-The-Fly reporting is unchecked in the Report Options as this will not work this way.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 12
(6,363 Views)

Ignore this it is for a different post:http://forums.ni.com/t5/NI-TestStand/how-to-edit-station-id-value/m-p/1688734/highlight/false#M34304

 

OK got it:

 

Place a Statement step in your sequence and put the following in there:

 

RunState.Root.Locals.StationInfo.StationID = Locals.MyModifiedMachineName

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 12
(5,752 Views)

I changed the file horizontal.xsl (C: \ Program Files (x86) \ National Instruments \ TestStand 4.2.1 \ Components \ Models \ TestStandModels \ StyleSheets \ horizontal.xsl) .... look <b> Station ID </ b > Station ID and change the name you want .... but under Station ID shows the name of the computer ... Is there a way to change the content by modifying the file. xsl? Thanks for any replies

0 Kudos
Message 7 of 12
(5,596 Views)

Hi,

 

I am guessing that changed the header "Station ID" but not the contents below it. There are a few things you need to change in the xsl file and in TestStand. 

 

1. Add ModifyReportHeader Sequence File Callback to your sequence file.

2. Create a local variable. Store the information you want to show up under Station ID here.

3. Add a function statement with the following expression:

Parameters.ReportHeader += Locals.Local Variable Name.GetXML(XMLOption_NoOptions, 0, "Local Variable Name", Parameters.ReportOptions.NumericFormat)

Note: If your local variable is a type other then numeric, you will need to change the last parameter for "GetXML".

4. In the XML file, change everywhere you see "Prop[@Name='StationInfo']/Prop[@Name='StationID']" to Prop[@Name='Local Variable Name'].

5. Also, change <xsl:template match="Prop[@Name='StationID']"> to  <xsl:template match="Prop[@Name='Local Variable Name']"> 

 

This should put the data under StationID.

 

I would recommend you make a copy of horizontal.xsl file and make changes to the copy and not the original file.

Rohama K.
0 Kudos
Message 8 of 12
(5,575 Views)

Hi Rohama,

I followed all your steps but under Station ID I'm writing what I write in UUT serial number. See attached

Download All
0 Kudos
Message 9 of 12
(5,554 Views)

Do you see a shift in everything you are now seeing in the header? Attach a screenshot of the step you added to ModifyReportHeader and the local variable you created to store the information you wanted to see under Station ID and your XML file. 

Rohama K.
0 Kudos
Message 10 of 12
(5,541 Views)