NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add UUTStatus (Passed, Failed) to Reports?

Solved!
Go to solution

I am using TS 2022 and would like to add to the reports the UUTStatus with "passed" or "failed". To generate I use the callback "ReportOptions" for the BaseName, BatchBaseName etc.

This generates a reportname which looks like this:

 

Report DUT[07 48 54][06 04 2023].xml

 

How can I add to this report name the UUTStatus that the report looks like this:

 

Report DUT[07 48 54][06 04 2023] passed.xml

 

 

In the callback "ReportOptions" I can't find any parameter

 

Thanks

0 Kudos
Message 1 of 14
(1,576 Views)

Check for Configurations/ Report Options, where File Path can be Configured based on Expression.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 14
(1,544 Views)

Do you have an example where the batch report can be changed like you mentioned?

0 Kudos
Message 3 of 14
(1,539 Views)

@Norick17 wrote:

Do you have an example where the batch report can be changed like you mentioned?


Specify Report File Path by Expression - NI

0 Kudos
Message 4 of 14
(1,504 Views)

Well I know this document but the question is "which parameter in the callback ReportOptions -> Parameters -> ReportOptions" do I need to change and how the expression looks like?

0 Kudos
Message 5 of 14
(1,479 Views)

eejallen_0-1681917936679.png

0 Kudos
Message 6 of 14
(1,468 Views)

@Norick17 wrote:

Well I know this document but the question is "which parameter in the callback ReportOptions -> Parameters -> ReportOptions" do I need to change and how the expression looks like?


Depending on which model you are using, the expression that you would need could be one of these:

Parameters.ReportOptions.ReportFileSequentialModelExpression

Parameters.ReportOptions.ReportFileParallelModelExpression

Parameters.ReportOptions.ReportFileBatchModelExpression

 

In my test it looks like this: "$(ClientFileDir)\\Data\\$(ClientFileName)_Report[$(FileTime)][$(FileDate)]$(Unique).$(FileExtension)"

0 Kudos
Message 7 of 14
(1,463 Views)

Parameters.ReportOptions.ReportFileSequentialModelExpression

Parameters.ReportOptions.ReportFileParallelModelExpression

Parameters.ReportOptions.ReportFileBatchModelExpression

 

In my test it looks like this: "$(ClientFileDir)\\Data\\$(ClientFileName)_Report[$(FileTime)][$(FileDate)]$(Unique).$(FileExtension)"

 

 

 


So how would you combine the expression when the BaseName is set as:

 

Parameters.ReportOptions.BatchBaseName = "Report"

 

In case of the sequential model can you simply add it to:

 

Parameters.ReportOptions.ReportFileSequentialModelExpression = StationGlobals.ReportDirectory\\Parameters.ReportOptions.BatchBaseName_$UUTStatus.$(FileExtension)



When doing so, it does not work at all.. Any idea what is wrong with such expression?

 

 

 

 

0 Kudos
Message 8 of 14
(1,432 Views)

I think you are misunderstanding TestStand variables.

Parameters.ReportOptions.ReportFileSequentialModelExpression is the name of a variable.  This variable is an expression string so it has be formatted as an expression:

 

If you are using Sequential Model:

Parameters.ReportOptions.ReportFileSequentialModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BaseName + "_$(UUTStatus).$(FileExtension)" + "\""

 

If you are using Batch Model:

Parameters.ReportOptions.ReportFileBatchModelExpression = "\"" + StationGlobals.ReportDirectory + "\\\\" + Parameters.ReportOptions.BatchBaseName + "_$(UUTStatus).$(FileExtension)" + "\""

0 Kudos
Message 9 of 14
(1,426 Views)

now I implemented as you wrote but the report name remains the same. This means only the $(FileExtension) is written while the $(UUTStatus) is still missing. When doing everything within the report GUI it works but unfortunately not when doing in the ReportOptions callback.

 

 

0 Kudos
Message 10 of 14
(1,403 Views)