This section provides a detailed explanation of the 'add connection-override' and 'add export-definition' commands, their options, and usage examples. For a comprehensive understanding of each command and its options, refer to the application's built-in help, which can be accessed using the '-h' flag with any command.
Add Connection-Override Command
This command allows you to define a connection setting that can be reused in export commands. The connection override is particularly useful when working with multiple databases or servers of various types and brands.
trp add connection-override [options]
Example of adding a connection override:
.\trp add connection-override --nickname "sqlserver-test" --username "testuser" --password "testpassword" --server "XtremeNative" --database "xtreme"
Add Export-Definition Command
This command allows you to define custom export settings that can be reused when exporting reports. These settings include options specific to certain export formats.
trp add export-definition [options]
Examples of adding export definitions for CSV, XLS-Data, and PDF formats:
.\trp add export-definition csv --nickname "csv-export" --delimiter '|' --separator ","
.\trp add export-definition xls-data --nickname "xls-data-export" --constant-column-width 128 --export-object-formatting false --export-images false --use-worksheet-functions-for-summaries false --maintain-relative-object-positions false --maintain-column-alignment false --export-page-header-and-footer true --simplify-page-headers true --show-group-outlines false
.\trp add export-definition pdf --nickname "pdf-export" --use-page-range false --page-range-all true --first-page 1 --last-page 1 --bookmark-group-tree true
Using Connection-Override and Export-Definition in Exports
You can use the predefined connection overrides and export definitions in your 'export' command to efficiently manage your report exports. This allows you to reuse database connections and export settings across multiple exports.
Here are examples of using connection overrides and export definitions to export a report to CSV, XLS-Data, and PDF formats:
.\trp export $inputReport --destination $OutputCsv --export-definition-nickname "csv-export"
.\trp export $inputReport --destination $OutputXls --export-definition-nickname "xls-data-export"
.\trp export $inputReport --destination $OutputPdf --export-definition-nickname "pdf-export"
.\trp export $inputReport --destination "path\to\output\report.csv" --connection-override-nickname "sqlserver-test" --export-definition-nickname "csv-export"
.\trp export $inputReport --destination "path\to\output\report.xls" --connection-override-nickname "sqlserver-test" --export-definition-nickname "xls-data-export"
.\trp export $inputReport --destination "path\to\output\report.pdf" --connection-override-nickname "sqlserver-test" --export-definition-nickname "pdf-export"