3.13. Using the FastReport server together with other HTTP servers (Apache, IIS, etc)

To use already existing solutions based on other HTTP servers, their integration with the FastReport server is possible by means of the "CGI" mechanism. It gives an advantage in comparison with using a built-in HTTP server FastReport. Reports can be built in an already-working system (site). HTTP server and a server of reports can work on different computers. Usage "SSL" encoding for operation with HTTP a server is possible (this possibility is unavailable in HTTP server FastReport yet).

Applying such method, CGI becomes an intermediate for tranfering a query to the "FastReport" server, obtaining results from a server of reports, and return of the results to the client.

You can found example of CGI wrapper in the "Demos\ClientServer\CGI" folder.

To us the CGI wrapper:
- compile and copy file fastreport.exe to the folder /cgi-bin of the HTTP server;

- configure the HTTP server (Apache, IIS or other) to execute the CGI application. Read more about this in HTTP server user manual;

If HTTP and reports servers work on same computer:

- if TCP/IP port 80 is used by HTTP server configure the FastReport server on other port 8097 (this port is used by CGI application by default if configuration file is missed), if you want to use other TCP/IP port, read below about using the configuration file of the CGI application;

If HTTP and FastReport servers work on separate computers:

- create the configuration file of the CGI application in folder /cgi-bin with name fastreport.ini:

[REPORTSERVER]

; IP address of the FastReport server

Host=192.168.0.34

; IP port of the FastReport server

Port=80

- launch the FastReport server and check work of the CGI application.

Report query example with using of CGI application:
http://127.0.0.1/cgi-bin/fastreport.exe?report=67.fr3&multipage=0&pagenav=0

Read more about query line syntax in 3.3 topic. Replace the "result" keyword in this point at "cgi-bin/fastreport.exe" construction.

Attention: to restrict direct access to the report server from clients, it is necessary to specify an IP address of the HTTP server, on which CGI application works (127.0.0.1 or other).

| < previous page |  | main page | next page > |