Back to Top

Invoke-TRProcessor

Invoke-TRProcessor

Synopsis

Use to "run" reports. One command to open, refresh, and export a report.

Syntax

Invoke-TRProcessor [[-ExportDefinition] <ExportDefinition>] [-Path] <String> [[-Destination] <String>] [-ReportParameters <String>] [-ReportFormula <String>] [-ForceAsync] [-AsJob] [-ConnectionInfo <Connection>] [<CommonParameters>]

Description

This command will open, refresh, and export a report.

To open the report, it needs to know the location of the report file to process. The path of the report file must be passed to this command.

To refresh the report, the computer must be configured to connect to the data source or database driver referenced inside the report. This will take initial, one time, setup. The setup must be done such that the reporting engine can find the data source referenced inside the report. If this data source doesn&;39;t exist on the system, as referenced inside the report file, the process will throw a connection error at this point.

Override the connection settings referenced inside the report by passing the ConnectionInfo parameter the results of a Set-Connection command. This is useful for automating database login. However, overriding database settings will slow down the processing of the report.

ExportDefinition accepts the results of the Set-Export command. If no export is defined, the report is exported to the My Documents folder.

Use the AsJob command to run the processes in the background.

Use the Verbose command details of how the command parameters are interpreted.

Parameters

-ExportDefinition <ExportDefinition>

Expects and accepts the results from the Set-Export command.

Required? False
Position? 2
Default value  
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-Path <String>

The path to the report file to process.

Required? True
Position? 0
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Destination <String>

The location to where the report will be exported.

Required? False
Position? 1
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ReportParameters <String>

Parameters to be passed to the report file. These are generally used to filter the report data. For instance, you may want to pass a date to a report.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ReportFormula <String>

Override the formula that is embedded inside the report.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ForceAsync <SwitchParameter>

Forces additional task switching between different parts of the export jobs. You should use the AsJob command without this flag to run reports in the background. This is an additional optional feature that may give mixed results.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-AsJob <SwitchParameter>

Run as a background job.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ConnectionInfo <Connection>

Expects and accepts the results from the Set-Connection command.

Required? False
Position? named
Default value  
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

Outputs

Notes

Examples

Example Simple

PS C:\> Invoke-Report "C:\Path\To\Report.rpt"

Will attempt to run the report. The updated report will be exported to PDF format. The output will be placed in a file in the My Documents folder.

Related links