NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Blessing_Star
Posts: 36
0 Kudos

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

 

Active Participant
~jiggawax~
Posts: 1,028
0 Kudos

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

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
Test Development Engineer
L-3 Communications
Member
Blessing_Star
Posts: 36
0 Kudos

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

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

Active Participant
~jiggawax~
Posts: 1,028
0 Kudos

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

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
Test Development Engineer
L-3 Communications
Active Participant
~jiggawax~
Posts: 1,028
0 Kudos

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

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

 

Regards,

jigg
Test Development Engineer
L-3 Communications
Active Participant
~jiggawax~
Posts: 1,028
0 Kudos

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

[ Edited ]

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
Test Development Engineer
L-3 Communications
Member
freader
Posts: 5
0 Kudos

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

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

Member
Rohama_K
Posts: 162
0 Kudos

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

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.
Applications Engineer
National Instruments
Member
freader
Posts: 5
0 Kudos

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

Hi Rohama,

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

Member
Rohama_K
Posts: 162
0 Kudos

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

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.
Applications Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page