Products Downloads


French version


 


The Adelia Crystal Reports Print Engine (ACRPE) produces Crystal Reports in Web API format.

This engine runs in a Windows environment (.NET version 4.6.1 minimum + Crystal Reports for Visual Studio Runtime SP26 or +).
Benefits of the ACRPE include increased reliability, improved performance and an easier deployment method.
The ACRPE can be used instead of the Adelia Middleware print service (svcgenrapw).


There are two forms of ACRPE:

  • a console application called ACRPE_console.exe and 
  • a Windows service type application called ACRPE_service.exe.

These two applications are provided in the ACRPE sub-directory of the Adelia Studio runtime installation directory.
An archive (.zip) containing all the ARCPE objects is available in the Distrib/ACRPE sub-directory.




ACRPE_Console

acrpe_console [-cfgdir:<DirName>][-port:<PortNumber>]
acrpe_console -help


The ACRPE requires a configuration directory, by default: c:\ACRPE. This directory can be changed using the -cfgdir:<DirName> option.

For example: acrpe_console -cfgdir:"d:\configuration\acrpe"


The ACRPE's default listening port is 3007. This port can be changed using the -port:<PortNumber> option. 

For example: acrpe_console -port:3025

This listening port can also be changed using the ACRPE.config configuration file placed in the ACRPE configuration directory.




ACRPE_Service

acrpe_service accepts the same startup options as the console application (-cfgdir and -port).
The service is installed using the sc create command in a DOS invite in administrator mode.


Example: 

sc create ACRPE binpath="<DirACRPE>\acrpe_service.exe"

or with the
sc create ACRPE  binpath="<DirACRPE>\acrpe_service.exe -cfgdir=\"d:\configuration\acrpe\"" cfgdir option


The service can be:

  • started using the sc start command: sc start ACRPE
  • stopped using the sc stop command: sc stop ACRPE
  • uninstalled using the sc delete command: sc delete ACRPE




ACRPE configuration

The ACRPE (console or service) is configured using files placed in the configuration directory (c:\acrpe directory by default or directory for which the value was set on startup via the -cfgdir option).
This directory must contain:

  • a configuration file (in XML format) called ACRPE.config,
  • a directory or directories containing the .RPT report files or archives in .zip format containing .RPT report files,
  • optionally, a log configuration file (in XML format) called log4Net.config.

ACRPE.config

The ACRPE.config configuration file sets the following information:

  • The ACRPE listening port. If a port value is passed in the startup options, the value proposed in the configuration file is ignored.

    ACRPE.config - <Port>
    <?xml version="1.0" encoding="utf-8"?>
    <ACRPEConfig>
    	<Port>3020</Port>
    </ACRPEConfig>
  • The directories or archives containing the .RPT files.


    • Directories
      In the <ReportsDirLoaders> element, define a <ReportsDirLoader> sub-element for each directory to search.
      Note: the relative directory names are relative to the configuration directory.

      ACRPE.config - Directories - <ReportsDirLoaders>
      <?xml version="1.0" encoding="utf-8"?>
      <ACRPEConfig>	
      	<ReportsDirLoaders>
      		<ReportsDirLoader>Reports1</ReportsDirLoader>
      		<ReportsDirLoader>Reports\Reports2</ReportsDirLoader>
      		<ReportsDirLoader>c:\Reports</ReportsDirLoader>
      	</ReportsDirLoaders>
      </ACRPEConfig>
    • Archives (.zip)
      In the <ReportsZipLoaders> element, define a <ReportsZipLoader> sub-element for each archive to search.
      The archive name and path are entered in the <ZipArchive> element.
      Note: the relative directory names are relative to the configuration directory.
      The directories to search can be specified in the archive using <FromDir> sub-elements contained in a <FromDirs> element.

      ACRPE.config - Archives - <ReportsZipLoaders>
      <?xml version="1.0" encoding="utf-8"?>
      <ACRPEConfig>
      	<ReportsZipLoaders>
      		<ReportsZipLoader>
      			<ZipArchive>Reports\reports.zip</ZipArchive>
      			<FromDirs>
      				<FromDir>com</FromDir>
      				<FromDir>alt</FromDir>
      			</FromDirs>
      		</ReportsZipLoader>
      	</ReportsZipLoaders>
      </ACRPEConfig>
  • throttling options.Throttling limits the number of incoming requests in a period. For complex processing (large reports), throttling can be used to avoid overloading a machine.
    A limit can be set for the number of requests accepted per second <LimitPerSecond>, per minute <LimitPerMinute> or per hour <LimitPerHour>.  
    Once the quota has been reached, the server responds immediately with an HTTP 429 Too many requests error.

    ACRPE.config - Throttling
    <?xml version="1.0" encoding="utf-8"?>
    <ACRPEConfig>
    	<Throttle>
    		<LimitPerSecond>10</LimitPerSecond>
    	</Throttle>
    </ACRPEConfig>
log4Net.config

ACRPE logs use the Log4Net framework developed by the Apache Foundation. The log4Net.config file is used to define the ACRPE log configuration.

The list and use of available appenders are provided on the framework reference site: https://logging.apache.org/log4net/release/config-examples.html

log4Net.config - For example: RollingFileAppender
<?xml version="1.0" encoding="utf-8"?><log4net>
	<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
		<file value="d:\ACRPE\ACRPE.log"/>
		<appendToFile value="true"/>
		<maximumFileSize value="100000KB"/>
		<maxSizeRollBackups value="2"/>

		<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%date %level %thread Rpt=[%property{report}]-User=[%property{user}]-Pgm=[%property{pgm}] - %message%newline"/>
		</layout>
	</appender>

	<root>
		<level value="ERROR"/>
		<appender-ref ref="RollingFile"/>
	</root>
</log4net>

Note: ACRPE sets the following three context properties to enrich the logs: 

  • pgm: Current program name -> value of *PGM reserved word

  • user: User name -> value of *USER reserved word

  • report: Current report name

A property is displayed using the %property{PropertyName} syntax (see example below).


Note

Based on the INFO level, all ACRPE requests and responses are logged.


[CLOUD / WEB / EVENT] The ACRPE is used instead of the Adelia Middleware print service

Currently, in a Java context, print service configuration is based on the association of the *WEB_REPORT logic server with a physical server (MwClient.ini). 
The middleware configuration of the server (MwServer.ini) has the directory containing the .RPT report files in its context information.

The ACRPE can be used instead of the middleware print service by changing the association of the *WEB_REPORT logic server.
The new association must target the *WEB_API pseudo-physical server, the ACRPE access point must be entered (ApiEndPoint field): http://<Ip_ACRPE>:<Port_ACRPE>/ACRPE

Using the ACRPE as an Adelia print server - Example of association of *WEB_REPORT logic server with the *WEB_API server.


↑ Top of page


  • Aucune étiquette