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 [ACRPE_console.exe (Any CPU), ACRPE_console_x86.exe (32 bits), ACRPE_console_x64.exe (64 bits)] and 
  • a Windows service type application called ACRPE_service [ACRPE_service.exe (Any CPU), ACRPE_service_x86.exe (32 bits), ACRPE_service_x64.exe (64 bits).

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.


Note: There are 3 versions of ACRE_console and ACRPE_service applications:

  • ACRPE_console.exe and ACRPE_service.exe applications are "Any CPU" type and can run equally well with a Crystal Reports .NET 32-bit runtime as with a Crystal Reports .NET 64-bit runtime.
  • ACRPE_console_x86.exe and ACRPE_service_x86.exe applications can only run with a Crystal Reports .NET 32-bit runtime.
  • ACRPE_console_x64.exe and ACRPE_service_x64.exe applications can only run with a Crystal Reports .NET 64-bit runtime.


Warning: the use of the Crystal Reports .NET 64-bit runtime requires Crystal Reports reports (.rpt) containing an "ADO.NET(XML)" single data source, created from an interface file called "_data.xsd".
The CRFieldsOnlyToXSD.exe utility is used to migrate reports (contained in a directory or Adelia environment) with a "Field definition only" single data source, created from an interface file called "_data.ttx", to an "ADO.NET(XML)" / _data.xsd" data source.



ACRPE_Console

acrpe_console | acrpe_console_x86 | acrpe_console_x64 [-cfgdir:<DirName>][-port:<PortNumber>][-delegate_printing:true|false]
acrpe_console | acrpe_console_x86 | acrpe_console_x64 -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.


For printing, the ACRPE uses the Crystal Reports print module by default. The -delegate_printing:true option is used to delegate printing to the print utility provided in Adelia: hawrite64.exe.
In this delegation mode, the report is first of all exported to a file in PDF format, which is then printed by the hawrite64 utility and its pdfium module.




ACRPE_Service

acrpe_service | acrpe_service_x86 | acrpe_service_x64 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>
  • Print delegation via hawrite64 and its pdfium module. If a delegation value is passed in the startup options, the value specified in the configuration file is ignored.

    <?xml version="1.0" encoding="utf-8"?> <ACRPEConfig> <DelegatePrinting>true</DelegatePrinting> </ACRPEConfig>


    For printing, the ACRPE uses the Crystal Reports print module by default. The -delegate_printing:true option is used to delegate printing to the hawrite64 utility.
    In this delegation mode, the report is first of all exported to a file in PDF format, which is then printed by the hawrite64 utility and its pdfium module.


  • 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