The Production Reporting Remote methods allow an application to connect to a server, submit and run Production Reporting programs remotely, receive the report output, and/or transfer files.
Production Reporting Remote is very useful for running long Production Reporting programs that contain large amounts of data.Production Reporting Remote benefits include:
Table 3. Production Reporting Remote Methods
| Method Type | Methods |
|---|---|
RemoteGetUniqueSqrFile (Method) |
The following Visual Basic example opens a connection to the server, runs the Production Reporting program REPORT.SQR on the server, and closes the connection.
Sqr0cx.RemoteConnect("sun4, "myuser", "mypassword", " ")
Sqr0cx.RemoteRun("report.sqr acctg/acctg")
Sqr0cx.RemoteDisconnectThe next example opens a connection to the server, transfers the Production Reporting program to the server, removes any ERR file, runs the Production Reporting program on the server, checks for an ERR file, gets the SPF output file, and closes the connection.
' connect to server
Sqr0cx.RemoteConnect("boston", "reports", " ", " ")
' transfer Production Reporting program to server
Sqr0cx.RemotePut("sales.sqr", "sales.sqr", False)
' remove any error file
Sqr0cx.RemoteDeleteFile("sales.err")
' run report on server
Sqr0cx.RemoteExec("sqr sales.sqr tutorial/secret -e
-nolis", "output.txt")
' check if errors file exists, if does error occurred.
If Sqr0cx.RemoteCheckFile("sales.err") Then
' there’s an error file...
' get output SPF file
If Sqr0cx.RemoteGet("sales.spf", "sales.spf", True)
' disconnect and close
Sqr0cx.RemoteDisconnect