This topic gives a detailed description of command-line switches and examples of their usage.
To view command-line switches for /datareport, run the following command:
dbforgesql.com /datareport /?
Note
To run dbForge Studio CLI commands, open Command Prompt and navigate to the folder that contains
dbforgesql.com. The default path to this executable depends on where dbForge Studio for SQL Server is installed. If you installed dbForge Studio:
- As a standalone tool
C:\Program Files\Devart\dbForge Studio for SQL Server
- As part of the dbForge Edge bundle
C:\Program Files\Devart\dbForge Edge\dbForge Studio for SQL Server
All switches available for this option are listed below, along with usage examples.
| Name | Description |
|---|---|
/connection |
Specifies a connection string with additional parameters. Example: dbforgesql.com /datareport /connection:"User Id=your_username;Server=your_server_name" Usage: /connection:<connection_string> |
/errormode |
Specifies the application’s behavior when an error occurs:
Usage: /errormode:<ignore|abort> |
/exitcodes |
Displays the list of exit codes that can be returned by the command-line process. Usage: /exitcodes |
/fieldseparator |
Specifies the field separator for a CSV report format. Usage: /fieldseparator:<separator> |
/format |
Specifies the report format. Note: If multiple files or folders are generated for an HTML report, it will not be sent by FTP or email. Available options:
Example: dbforgesql.com /datareport /format:PDFUsage: /format:<format_type> |
/parameters |
Specifies values for parameters declared in a query in the report template. Example: dbforgesql.com /datareport /parameters param1:value1 param2:value2 Usage: /parameters <param_name1>:<param_value1> <param_name2>:<param_value2>[...] |
/password |
Specifies a server password and overrides the one in the connection string. Example: dbforgesql.com /datareport /password:"yourpassword"Usage: /password:<password> |
/reportfile |
Specifies the report template file. Example: dbforgesql.com /datareport /reportfile:"D:\Reports\sample_report.rdb" Usage: /reportfile:<file_path> |
/result |
Specifies how to handle the generated report: save to a folder, send by email, or upload via FTP. Optionally, the report can also be sent by email. Note: You can specify SMTP settings on the corresponding Options dialog page. To open the Options dialog, navigate to the Tools menu and select Options > Environment > SMTP. Examples: 1. Save to folder: /result folder:"D:\output\"2. Send by email: /result email:"[email protected]"3. Upload via FTP: /result folder:"ftp://hostname.net/output/" ftplogin:username ftppassword:your_password4. Send by email and upload via FTP: /result email:"[email protected]" folder:"ftp://hostname.net/output/" ftplogin:your_username ftppassword:your_password Usage: /result folder:<folder_path> [email:<email_address>] | folder:<ftp_url_to_folder> ftplogin:<username> ftppassword:<password> [email:<email_address>] |
/resultfilename |
Specifies the generated report file name. Example: dbforgesql.com /datareport /resultfilename:report1Usage: /resultfilename:<filename> |
/treatwarningaserror |
Specifies how to treat warnings:
Usage: /treatWarningAsError:[Yes|No] |
For more examples, see Automate report creation from the command line.