02-27-2008 09:14 AM
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.
Have a good day
02-27-2008 09:22 AM
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
02-27-2008 09:39 AM
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
02-27-2008 09:56 AM - edited 02-27-2008 10:04 AM
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
02-27-2008 01:50 PM - edited 02-27-2008 01:51 PM
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 (").
02-28-2008 01:41 AM
04-01-2008 10:28 AM
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.
04-01-2008 10:45 AM