NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert a comment in Teststand Report

Try my example with the following post expression.

Step.Result.ReportText = Step.AsPropertyObject.Comment

Should work and the behaviour should be very similar to what you're looking for.

Besides I'd like to point out what Pirelli says about Tyres "Power is nothing without control".
Teststand is extreamly powerful but a TestStand course is strongly recommended. Otherwise the risk is to get yourself lost trying cumbersome code to get a functionality TestStand already provides you with a couple of lines in the rigth position.

TestStand Training

Have a good day

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 11 of 18
(1,950 Views)

I've already used Result.TextReport and it works, but I don't want use TextReport variable, because I need it in CVI function.

I'd like to use a new variable to store my comment and use this new variable in teststand report html.

Your sequence store the comment in a variable (ClonedComment), but I don't know how to recall it in reportgen_html.seq.

I know that TS4 is powerfull, but my Boss will never pay me a training course 😉 and the training example in TS4 is not so usefull

0 Kudos
Message 12 of 18
(1,949 Views)

Hi Corma,

How are you using this in a CVI Function and where are you using this CVI function.

I have a feeling that every one responsing to your query hasn't grasp what it is you are trying to do. I know I am a bit lost.

If Result.TextReport works for you why are you trying to find another solution?

Whether you use TS4 or TS3.5 or even TS2.0 the report generation has change much.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 13 of 18
(1,939 Views)

Hi Ray,

I use TS4.

I explain you my problem.

I write some test in CVI and I compile them as DLL.

In TS4 I call this DLL with a pass/fail test, and I select the function that I exported.

This is the prototype in Step setting:

Test_02(&Step.Result.PassFail, Step.Result.ReportText, &Step.Result.Error.Occurred, &Step.Result.Error.Code, Step.Result.Error.Msg)

In the function Test_02, I store the result of the test and some additional information using ReportText.

i.e. CVI code : Fmt( reportText, "Threshold Down: %f[p2] Threshold Up: %f[p2]", Volt_PSU_Dwn,Volt_PSU);

In report HTML TS4 print this information at the end of test (If You open reportgen_html.seq you will find PutOneResultInReport sequence, where you can find the statement Add ReportText (Outbuffer)).

Unfortunately, TS4 doesn't display in report the comment that I wrote in Pass/Fail test property, so the report display only the test name without any other description.

If I used Result.TextReport to store my comment, I lost the previous information that CVI stored.

Thx

Corma



Message Edited by Corma on 02-27-2008 10:04 AM
0 Kudos
Message 14 of 18
(1,935 Views)

Corma,

The + operator in TestStand can concatinate two strings.  So you can use the += operator to append to the end of a string:

Step.Result.ReportText += Step.AsPropertyObject.Comment

should do what you need.  Remember you can add spaces or other characters by simply using the + and inclosing them in quotes (").



Message Edited by Josh W. on 02-27-2008 01:51 PM
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 15 of 18
(1,920 Views)
Perfetct, that should be a solution to my problem, but I'd like to know how could I access to a local variable from report generator.
In example, if I stored some information in a local variable of my sequence, should it possible to recall it from from reportgen_html.seq?
 
Thanks again
0 Kudos
Message 16 of 18
(1,903 Views)

Corma,

Were you able to figure out how to append your local variable information to the report?  If you wanted to add extra information to the report you can always use the ModifyReportHeader/Footer callbacks to modify those portions of the report.  These only work with HTML & ASCII reports and if On-The-Fly reporting is turned off.  If you need to use these in conjunction with On-The-Fly reporting refer to this KnowledgeBase.  If you any need further assistance please feel free to post again.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 17 of 18
(1,743 Views)
Correction: It should work for the other report types also, but you have to use the proper XML tags in order to get the text to display.  Also not for XML you need to put the </Report> tag in your footer to properly close out the report or it will throw errors.
John B.
Applications Engineer
National Instruments
0 Kudos
Message 18 of 18
(1,735 Views)