Batch Scripting (Command Line)

i.Run CmWinClient.exe with following command line: 

CmWinClient.exe -db=DATABASENAME -user=USERNAME -passw=PASSWORD -script=SCRIPT 

DATABASENAME

Is the database name

USERNAME

Is the username of the database user

PASSWORD

Is the password of the database user

SCRIPT

Is the file path to SCRIPT

Refer to ii unterhalb

 

ii.SCRIPT points to a filename with extension .cms (ConnectMaster script), for example “print.cms”, and it contains command line to generate selected report(s) to PDF file(s). Command line:

iii.

print: object=OBJECT, objects=OBJECTS, filter=FILTER, report=REPORT, path=FOLDER, onereportperobject=SINGLE, overwrite=OVERWRITE, PARAMETER=VALUE*

OBJECT

The object reference, referenced either by the External Key or a Signature (i.e. 31/138).

Choose only one of the object reference parameters, object or objects or filter.

OBJECTS

The object references of many objects separated by a semicolon “; “.

Choose only one of the object reference parameters, object or objects or filter.

FILTER

The name of a saved filter which the filtered objects will be the objects references.

Choose only one of the object reference parameters, object or objects or filter.

REPORT

The name of the report template (see Library > Reports) which will be printed.

FOLDER

The desired target folder to save the generated PDF file.

SINGLE

An optional parameter to define if to print a single report or multiple reports for selected objects, values are "yes" or "no".

The default value is “yes“.

onereportperobject=yes èOne PDF file per object will be generated        
onereportperobject=no è One PDF file for all objects will be generated

OVERWRITE

An optional parameter to define if to overwrite existing PDFs of the same name, values are "yes" or "no".

The default value is “yes”.

overwrite=yes èFile will be overwritten automatically as there is no warning message to inform user a file of identical name already exists in the target folder
overwrite=no èNo files will be overwritten. New file will have its name extended with “-n”, where n is the increasing numbering

PARAMETER
=VALUE*

Optional parameters can be configured within report and have the parameter values transferred to the report.

 

iv.The naming convention for the generated report is “ObjectName-ReportName.pdf”