Setting up remote distributed mode

This topic shows how to set up your system to run reports in remote distributed mode.

Place report design documents on the daemon server

Place your report design documents (.4rp) on the server where the GRE daemon runs. If your design document references images using "file: url", place these files on the same server.

Ensure that the fonts, images, and printers required for the reports are available; see Configure fonts and Configure printers.

Connect to a daemon using the reporting API

Edit the source code to reflect that distributed mode is being used. This includes providing connection details, handle errors, and specifying the location for finished files.

Use the API function fgl_report_configureDistributedProcessing to select and configure distributed processing. It takes two parameters that denote the server to use: a host name and a port.

This example connects to a daemon running on the remote server (“PrintServer”):
IF NOT fgl_report_loadCurrentSettings("OrderReport.4rp") THEN   
  ...
END IF
...
CALL fgl_report_configureDistributedProcessing("PrintServer",6500)
RETURN fgl_report_commitCurrentSettings()

If required, configure the environment variables using the fgl_report_configureDistributedEnvironment function.

Note: The report definition files (4rp and all related resources) must reside on the GRE server.

Start the GRE daemon

Start the GRE daemon in listen mode with the -l portname option. The GRE daemon listens on the port specified by the -l option, and for each connection attempts to read an XML document from the socket. For example:
greportwriter -l 6500

Set up logging

If the GREDEBUG environment variable is set, the daemon logs messages of the specified level to the file gre.log in the home directory of the user invoking the daemon.

Important: Sensitive and personal data may be written to the output. Make sure that the log output is written to files that can only be read by application administrators.

The API function fgl_report_setDistributedRequestingUserName can set a user name in the log file in order to distinguish between log entries originating from different users.

Set up the GAS (if required)

If you need to set up the GAS, see the Genero Application Server User Guide.

Start the Web server service (if required)

If you are using reports other than SVG, start the Web server service.

Set up the Genero Report Viewer for HTML5 (if required)

If you want to view the report in a browser, see View report in a browser.

Note: When you build the Browser document directory and Browser font directory, you must prefix them with the path to the document root on the GRE (Web) Server (for example C:/tmp/web/).