Publish method: ReportDefn class

Syntax

Publish(ServerName, ReportPath, FolderName, ProcessInstanceID)

Description

Use the Publish method to publish the current report definition

You must have successfully completed a call to the ProcessReport method before you can use this method.

The Publish method was intended to be used primarily for reports running on the Process Scheduler server, but can also be used when running the report on the application server as well. In the latter case, even though the report is run on the application server, the report distribution must occur on an active Process Scheduler server that is configured with a running Distribution Agent service and a properly configured report node.

  • When the Publish method is called while running a report using the Process Scheduler server, the ServerName parameter must be specified as a blank string (""), and the ProcessInstanceID parameter must be set to the process instance of the calling process.

  • When the Publish is called while running a report on the application server, the ServerName parameter must be specified with an active Process Scheduler server that will post the report. The specified server must also have access to the report output destination folder in order to successfully post the report. If the application server and the Process Scheduler server share the same physical host machine, this will not be a concern. If not, you may specify an alternate output destination folder for the report (for example, a network share location) using the report definition’s OutDestination property to ensure that the Process Scheduler server is able to access it for posting the report.

Parameters

Parameter Description

ServerName

Specify the server to use for publishing the report, as a string. You can specify a null value for this parameter—that is, ("").

ReportPath

Always specify a null value only for this parameter—that is, ("").

FolderName

Specify the name of the report folder that the report should be posted to. You can specify a null value for this parameter—that is, (""). If you do not provide a value for this parameter, the default folder is used to post reports.

ProcessInstanceID

Specify the process instance of the calling process, such as the calling Application Engine program. If you specify a 0, a new process instance is generated to track the report posting process.

Returns

None.