WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login WinSPC Knowledgebase Home | Glossary | Favorites | Contact | Login
Search the WinSPC Knowledgebase Browse by Category
Can I generate a WinSPC report using command line options?
Article Details

Last Updated
27th of February, 2018

Applies to
WinSPC 8.0, WinSPC 8.1, WinSPC 8.2, WinSPC 8.3, WinSPC 9.0

Yes.

A WinSPC Report Book can be executed by Command Line Switch (CLS). The output of these reports can be either in PDF or HTML format.  Furthermore, using CLS options, you can leverage Windows' built-in Task Scheduler tool to automatically run a WinSPC Report Book at a specified time or time interval. For example, you would have Windows' Task Scheduler execute a WinSPC Report Book every day at 8:00 am, or on the 1st day of each month. For more information about Windows' Task Scheduler, please refer to the following Microsoft article:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa384006(v=vs.85).aspx

There are five CLS options available for WinSPC Report Books:

  • /rb - This option allows you to specify the name of the report book that should be executed. For example: 
    WinSPC.exe /rb MyReportBook 
    NOTE: If the name of the WinSPC Report Book contains spaces, you will need to enclose the name in double quotes. For example:
    WinSPC.exe /rb "My Report Book"
  • /rp - This option allows you to specify a parameter file that will provide the report book with the values for any prompted parameters or options, if your Data Set or Report Template have any. For example, a WinSPC Report Book might be configured to prompt the user for a date range to use in the report.  The /rp switch allows the command line switch to include this pre-defined date range.  NOTE: The absence of the /rp command when prompted parameters/options are present tells WinSPC to prompt the end user for any needed parameters.  There are three forms for the /rp option:
    • /rp ParameterFileNameWithNoSpaces.ini - This form is used to tell WinSPC to not prompt for any parameters and allows you to specify a parameter file (or full path to the parameter file) that does not contain any spaces.  If the full path is not specified, the file is assumed to be located in the WinSPC client station's ProgramData folder for WinSPC 9, or the WinSPC client station's installation folder on WinSPC 8.
      • In WinSPC 9 and above, this path is located, by default, in the following hidden folder: C:\ProgramData\DQS\WinSPC\
    • /rp "Parameter File Name With Spaces.ini" - This form is used to tell WinSPC to not prompt for any parameters and allows you to specify a parameter file (or full path to the parameter file) that does contain spaces.  If the full path is not specified, the file is assumed to be located in the WinSPC client station's Program Data folder for WinSPC 9, or the WinSPC client station's installation folder on WinSPC 8.
      • In WinSPC 9 and above, this path is located, by default, in the following hidden folder: C:\ProgramData\DQS\WinSPC\
    • /rp "" - This form is used to tell WinSPC to not prompt for any parameters and use all configured default values for any of the parameters.

Values in the file that match a needed parameter in both name and type will be used to generate the report.  Extra values will be ignored.  The format of each type of parameter must match that which the /rg option dumps. (See below)

  • /rg - This option instructs WinSPC to generate a prototype parameter ini file whose name is specified using the /rp option for the report book specified by the /rb option.  No report output will be generated when this option is used.  This option must be accompanied by both the /rb and /rp options. No action will be taken if one or the other is missing.  This ini file can then be used to set the report parameters with the /rp option.  Example:
    WinSPC.exe /rb MyReportBook /rp MyParamFile.ini /rg 
    will create the following file (assuming default WinSPC installation directory) and will NOT produce any report:
    "C:\ProgramData\DQS\WinSPC\MyParamFile.ini"
  • /rf - This option controls the format of the report output generated by the report book.  There are two forms of this option:  
    • /rfp - If this option is specified, then PDF output will be generated. NOTE: This is the default if no /rf option is specified.  The name of the PDF file will be the same as the name of the WinSPC Report Book. The PDF will be created in the "\Reports" folder that will be in the Users folder for the current Windows user that is logged in when executing the command. By default, "C:\Users\%USERPROFILE%\AppData\Roaming\DQS\WinSPC\" where %USERPROFILE% is the current Windows user logged into the workstation. For example, if you are logged into Windows with a user named WINSPCUSER and run the following command line:
      WinSPC.exe /rb MyReportBook /rfp
      The following PDF would be created as the report output:
      "C:\Users\WINSPCUSER\AppData\Roaming\DQS\WinSPC\Reports\MyReportBook.pdf"
    •  /rfh - If this option is specified, then HTML output will be generated.  The WinSPC Report Book will generate the HTML output into a sub-folder of the "\Reports\" directory, named for that WinSPC Report Book.  
For example, if you are logged into Windows with a user named WINSPCUSER and run the following command line: 
WinSPC.exe /rb MyReportBook /rfh 
The following directory will be created with the required HTML files to view the report output as a webpage: 
"C:\Users\WINSPCUSER\AppData\Roaming\DQS\WinSPC\Reports\MyReportBook\" 
  • /rd - This option instructs WinSPC to append the current date/time to the name of the generated report book output.  This allows each report that is produced to be created with a unique name, ensuring previous reports will not be overwritten.  This option will append the date/time in the format of "yyyymmddhhnnss" to the name of the PDF if the /rfp option is selected or the folder if the /rfh option is selected.  For the date/time format: 
    yyyy is the four digit year 
    mm is the two digit month (with leading zero)
    dd is the two digit day (with leading zero)
    hh is the two digit hour (24-hour format with leading zero)
    nn is the two digit minute (with leading zero)
    ss is the two digit second (with leading zero) 
    For example, if you are logged into Windows with a user named WINSPCUSER and run the following command line on February 28th, 2018 at 9:21:35 AM: 
    WinSPC.exe /rb MyReportBook /rfp /rd 
    The following PDF would be created:
    "C:\Users\WINSPCUSER\AppData\Roaming\DQS\WinSPC\Reports\MyReportBook 20180228092135.pdf"

NOTE: Each Windows user login will have their own User folder where the report output will be created.

For WinSPC 8 ONLY:
If Windows' User Account Control (UAC) is enabled, the report output will be in each Windows User's VirtualStore folder.
The Parameter Editor output path may be in the client installation folder or the VirtualStore in the following folder, depending on if UAC is enabled or not. By default, the client WinSPC install folder is either:
For Windows 32-bit: C:\Program Files\DQS\WinSPC\ 
For Windows 64-bit: C:\Program Files (x86)\DQS\WinSPC\
VirtualStore is located by default in the following folder:
For Windows 32-bit: C:\Users\%USERPROFILE%\AppData\Local\VirtualStore\Program Files\DQS\WinSPC\
For Windows 64-bit: C:\Users\%USERPROFILE%\AppData\Local\VirtualStore\Program Files (x86)\DQS\WinSPC\

 

Attachments
No attachments were found.
Related Articles
Visitor Comments
No visitor comments posted. Post a comment
Post Comment for "Can I generate a WinSPC report using command line options?"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
   Email Address:
* Your Comment:
* Enter the code below:
 

All Content 2012 DataNet Quality Systems. All Rights Reserved.