03-01-2012 10:06 AM
I'm testing five UUTs with the batchmodel.
Now I want to save the UUT reports to "c:\\test\\<UUT>_<UUTStatus>_<Unique>".
Therefor I've added the expression to the sequence "ReportOptions":
Parameters.ReportOptions.DisableReportGeneration = False, Parameters.ReportOptions.IncludeStepResults = True, Parameters.ReportOptions.AppendToFileIfItExists = False, Parameters.ReportOptions.Format = "html", Parameters.ReportOptions.BodyGenerator = "Sequence", Parameters.ReportOptions.BaseName = "", Parameters.ReportOptions.DirectoryType = "SpecifyByExpression", Parameters.ReportOptions.ReportFilePath = "c:\\test\\<UUT>_<UUTStatus>_<Unique>", Parameters.ReportOptions.GeneratePath = False, Parameters.ReportOptions.IncludeTimes = False, Parameters.ReportOptions.DateAndTimeFormat = "DateFirst", Parameters.ReportOptions.NewBatchFileNameForEachBatch = False
Now I get the following error:
Details:
An error occurred calling 'Save' in 'Report' of 'NI TestStand 2010 API'
Value invalid or out of range.. Error writing to file 'c:\test\<UUT>_<UUTStatus>_<Unique>.html'.
Error Code:
-17300; Value invalid or out of range.
Location:
Step 'Write Batch Report' of sequence 'Test UUTs' in 'BatchModel.seq'
What am I doing wrong? I've searched and tried a several thinks, but I can't find what goes wrong.
Solved! Go to Solution.
03-05-2012 07:19 AM
The Parameter.ReportOptions you should be using is
BatchFileBatchModelExpression
ReportFileBatchModelExpression
not ReportFilePath
with
DirectoryType = "SpecifyByExpression"
03-05-2012 08:51 AM
Thank you for your answer, but I still got a problem. I've changed the expression to:
Parameters.ReportOptions.DisableReportGeneration = False, Parameters.ReportOptions.IncludeStepResults = True, Parameters.ReportOptions.AppendToFileIfItExists = False, Parameters.ReportOptions.Format = "html", Parameters.ReportOptions.BodyGenerator = "Sequence", Parameters.ReportOptions.BaseName = "", Parameters.ReportOptions.DirectoryType = "SpecifyByExpression", Parameters.ReportOptions.GeneratePath = False, Parameters.ReportOptions.IncludeTimes = False, Parameters.ReportOptions.DateAndTimeFormat = "DateFirst", Parameters.ReportOptions.NewBatchFileNameForEachBatch = False, Parameters.ReportOptions.BatchFileBatchModelExpression = "", Parameters.ReportOptions.ReportFileBatchModelExpression = "c:\\test\\<UUT>_<UUTStatus>_<Unique>"
And now I get the following error:
Details:
Parameter 'newValue': Error in argument 2, 'Find(Parameters.ReportFilePath, "\\", 0, True, True)', in call to the expression function 'Left'.
The parameter which evaluated to -1 cannot be negative.
Error code:
-17300; Value invalid or out of range.
Location:
Step 'Set Temp File Directory Path' of sequence 'Setup Report Display Settings' in 'ModelSupport.seq'
Parameters.ReportFilePath contains ".html", so I think it is using the incorrect parameter for the ReportFilePath.
How can I force to use "ReportFileBatchModelExpression" in stead of "ReportFilePath"? I thougth this would be done by:
DirectoryType = "SpecifyByExpression", but this isn't working, do I have another incorrect setting?
03-06-2012 01:28 AM
Hi,
you need to set
Parameters.ReportOptions.GeneratePath = True
03-06-2012 02:35 AM - edited 03-06-2012 02:36 AM
Hello Ray,
I've tried it, but now it has a problem with the colon in the path. Which is very strange, because you can't have a path without a colon in it.
Is there a document which describes the options of "Parameters.ReportOptions.*" ? And/or is there an example of the thing which I am trying?
Or is it possible to convert the settings in "Configure -> Report Options..." to an expression?
Best regards,
Niek
03-06-2012 06:22 AM
I dont see your problem.
I used your settings as you posted with the adjustment for Parameters.ReportOptions.GeneratePath and it works fine.
03-09-2012 08:09 AM
I've tried a lot, but I still cann't get it running. I've attached a very simple test project. Maybe you can try to run it?
I use the batch model.
Thanks in advance,
Niek
03-10-2012 12:21 PM
I have opened your sequence file and I dont see any ReportOptions sequence. In fact there is nothing other than the MainSequence which contains no steps.
03-12-2012 03:35 AM
The Workspace contains a sequence file named "test_logging.seq", which contains the "ReportOptions" sequence.
This sequence contains a step named "Force Repoert Generation". See the attached screenshot.
It is correct that the MainSequence contains no steps, because I only want to test the generation of the report.
Best regards,
Niek
03-12-2012 04:57 AM
shouldn't you be using Expressions in your path string
Parameters.ReportOptions.ReportFileBatchModelExpression = "c:\\test\\<UUT>_<UUTStatus>_<Unique>"