From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TS 2019 PDF generation: stylesheet path does not exist.

Hi,

 

I would like to generate a PDF report at the end of my test sequence. I upgraded to TestStand 2019 because of that. The standard report generation (the one that is embedded into TestStand) works fine. However, when I check the PDF generation checkbox as per the image below, the generated PDF is a blank page that says "The Stylesheet path does not exist : TR5_Expand.xsl". The stylesheet IS where it is supposed to be. I tried absolute and relative paths, tried selecting the stylesheet from different folders, but the result is always the same. I don't know what to do. Is there a bug related to the PDF generation?

 

For your information, the test sequence file that I am using was originally created with TestStand 2012.

 

Thanks,

 

Michel

 

 

PDF generation checkbox checked, stylesheet selected:

 

PA-28_0-1589725382243.png

 

Report correctly generated:

 

PA-28_2-1589726038334.png

 

 

 PDF content:

PA-28_1-1589725476994.png

 

0 Kudos
Message 1 of 7
(2,955 Views)

Hi, did you ever fix this? I have exactly the same issue. Please share if you found the answer!  Thank you

Michael

0 Kudos
Message 2 of 7
(2,862 Views)

Although I don't know the solution to your problem but I may know how to find the cause.

 

In TestStand 2019\Components\Models\ModelPlugins (C:\Program Files (x86)\National Instruments\TestStand 2019\Components\Models\ModelPlugins) you can find NI_ReportGenerator.seq file. Open it and set breakpoint in Model Plugin - UUT Done at Call ConvertReportToPDF step.

 

Be sure you have tracing enabled in callbacks and entry point (station options).

 

There are two functions from TestStand 2019\Components\Models\TestStandModels\modelsupport2\modelsupport2.dll CheckWriteAccessPermissionForFile and CheckIfPDFConverterFileExists. See what result you have there. The actual PDF generator is in TestStand 2019\Components\Tools\PDFReportGenerator\PDFReportGenerator.exe. Unfortunately I don't see sources for it.

 

You can single step there and narrow down the issue.

 

Let me know what you find.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 3 of 7
(2,850 Views)

Thank you for your help, i have been able to narrow down the issue.  PDFReportGenerator.exe can be called from the command line.  It is not very helpful though; it is not documented and it does not return any stdout.  It is called with a path to an xml and it will create a pdf in the same folder.  I like to deselect the option to 'store absolute path' to the xml syyle sheet in Report Options.  this makes the files more portable between machines.  I copy the xsl into the same folder as the xml files.  However, this is exactly what will break the report generator.  It will not work if 'Store absolute path' is deselected.  Thank you for helping me to narrow this down, I have a suppprt request open with NI and I will post back here withe the findings.

thanks again, 

Michael.

0 Kudos
Message 4 of 7
(2,816 Views)

Have you received any feedback from NI concerning this issue? Until now it has not been fixed.

0 Kudos
Message 5 of 7
(1,940 Views)

I got nothing back. I'm not working on that system any more so I encourage you to report to NI?

0 Kudos
Message 6 of 7
(1,938 Views)

@MichaelS78 wrote:

PDFReportGenerator.exe can be called from the command line.  It is not very helpful though; it is not documented and it does not return any stdout.


Just in case the PDFReportGenerator.exe supports the following commands:

stylesheet - source file(?),

output - pdf location,

javascript - I have no idea how to use it,

report_id - something for System Link,

nopdf - disable pdf generation.

 

None of them are documented (undocumented features are just the NI thing - check TS2021 CLI).

IMHO PDFReportGenerator.exe is poor. As long as NI doesn't support CSS Page Media and @page rule, there is no point in bothering with this tool.

For paged media, I use Apache FOP (but this requires XSL-FO - more hassle but more options available). 

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 7 of 7
(1,922 Views)