Setting up local distributed mode

This topic shows how to set up your system to run reports in local 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 is for a GRE daemon running on the local machine (host “localhost”):
IF NOT fgl_report_loadCurrentSettings("OrderReport.4rp") THEN   
  ...
END IF
...
CALL fgl_report_configureDistributedProcessing("localhost",6500)
RETURN fgl_report_commitCurrentSettings()

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

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

You can optionally use the -o option. The -o option provides extra security by ensuring that the daemon accepts only local incoming connections. It must be used in conjunction with the -l option. For example:

greportwriter –l 5900 -o

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.

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.