There have been numerous enhancements for report printing in APEX 20.2. You can read all about the new features here. One of the new features is the ability to configure an application to use a Remote Server for printing. In this release, the only supported Remote Server for printing is Oracle Analytics Publisher.
Oracle Analytics Publisher is included as part of Oracle Analytics Cloud (OAC). The Publisher included in OAC has a RESTful service that allows you to securely post a request for a document in various output formats by passing the XML data and template using multi-part form input. APEX 20.2 makes use of this RESTful API when you configure a remote print server and use it for printing in your applications. Although the built-in report printing capabilities of APEX 20.2 are robust, Oracle Analytics Publisher adds the ability to create reports in rich text format (RTF) and also allows you to create and use your own templates for pixel perfect reports.
This post will give you step by step instructions on how to use Oracle Analytics Publisher as a remote print server for an application in APEX 20.2.
Login to your Oracle Cloud Infrastructure tenancy and follow the steps below.
Figure 1: Create Analytics Instance
Figure 2: Copy Access URL
The Oracle Analytics Publisher RESTful API included with Oracle Analytics Cloud uses Identity Cloud Service (IDCS) authentication with the Basic Auth scheme. To create an IDCS account for authentication, follow the steps below.
Figure 3: Create IDCS Account
In order for the user to be able to access the RESTful service, it must be added to the application role ServiceAdministrator in the IDCS application of the Analytics instance.
New in APEX 20.2 is the ability to create a Remote Server reference to a print server at the workspace level. You can then configure any APEX app within this workspace to use that remote print server for report printing. The Oracle Analytics Publisher RESTful service endpoint is /xmlpserver/services/rest/v1/format/render. To create a Remote Server reference to the service, use the URL you copied when creating the Analytics instance (removing /ui/) and add /xmlpserver/services/rest/v1/format/render.
Figure 4: Create Remote Print Server
Create Basic Auth credentials for the previously created IDCS account in Workspace Utilities.
Figure 5: Create Web Credentials
New in APEX 20.2 is the ability to define Report Printing attributes for an application. You can either use built-in printing, print settings defined at the instance level, or a Remote Print Server. Create a new application with at least one interactive report or use an existing application and change the application definition to use a Remote Print Server.
Oracle Analytics Publisher also works with Report Queries and custom Report Layouts defined in Shared Components of an application.
Figure 6: Configure Application Definition Report Printing
It is easy to configure your APEX 20.2 applications to use Oracle Analytics Publisher included with Oracle Analytics Cloud to create high fidelity reports. Once you have created an Oracle Analytics instance and assigned an IDCS user to the application ServiceAdministrator role, you can then create a Remote Server and Web Credential in APEX 20.2 and then change the Report Printing attributes of your application to use the defined Remote Print Server.
For those customers familiar with BI Publisher integration configured at the instance level in APEX Administration Services, they will be able to leverage all of their existing report templates unchanged. Oracle Analytics Publisher is completely compatible with all the features previously built-in to APEX for BI Publisher such as Report Queries and Report Layouts.
You can take advantage of this new printing option in your on premises APEX 20.2 environment as well as in Oracle Cloud including Oracle Autonomous Database on shared Exadata infrastructure.