Previous Next JavaScript must be enabled to correctly display this content

## 8.12 Printing Report Regions

Configure a report region to print by exporting it to several different formats.

Tip:

You must enable network services to use report printing if you configured an external print server. See Enabling Network Services in Oracle Database.

- About Report Printing
  Learn about region report printing.
- About Printing Reports to PDF and Excel
  Learn about printing reports to PDF and Microsoft Excel.
- Configuring Report Printing at the Application Level
  Configuring report printing at the application level.
- About Classic Report Printing Methods
  Learn about printing classic report regions.
- Configuring Classic Report Printing Attributes
  Learn about printing a report region by configurng Printing Attributes.
- About Report Queries
  Learn about report queries.
- About Report Layouts
  Learn about report layouts.

See Also:

- Configuring Interactive Report Download Options

- Configuring Interactive Grid Download Formats

Parent topic: Developing Reports

### 8.12.1 About Report Printing

Learn about region report printing.

By taking advantage of region report printing, your application users can view and print reports that have a predefined orientation, page size, column headings, and page header and footer. Classic reports, interactive reports and interactive grids also have the ability to export to PDF, Microsoft Excel, HTML, and Comma Separated Values (CSV). Additional export formats require the use of an external print server.

Oracle APEX provides the following report printing configuration options:

- None (Native) - Select this option if you do not use an external print server. This option enables you to use the basic printing functionality, which includes CSV, HTML, PDF, and XLSX.
- Oracle Document Generator Pre-built Function - Select this option if you are using Oracle Document Generator Pre-built Function. This option enables you to take report query results and convert them from JSON to PDF/Microsoft Office format using Oracle Document Generator Pre-built Function. Select this option to upload your own Microsoft Office templates for printing reports within APEX.

- Oracle BI Publisher - This option requires a valid license for Oracle BI Publisher (also known as Oracle XML Publisher). This option enables you to take report query results and convert them from XML to RTF format using Oracle BI Publisher. Select this option to upload your own customized RTF or XSL-FO templates for printing reports within APEX.

  Oracle BI Publisher supports Adobe Portable Document Format (PDF), Microsoft Word Rich Text Format (RTF), Microsoft Excel format (XLS), or Extensible Markup Language (XML). If you choose to use other third-party rendering engines, you can also configure other output formats.

- APEX Office Print - Select this option if you are using APEX Office Print. This option enables you to take report query results and convert them from JSON to PDF/MS Office formats using APEX Office Print. Select this option to upload your own MS Office templates for printing reports within APEX.
- External (Apache FOP) - Select this option if you are using Apache FOP on an external J2EE server. This option enables you to use the basic printing functionality, which includes creating report queries and printing report regions using the default templates provided in APEX and using your own customized XSL-FO templates.

Note:

Your APEX instance administrator can change the report printing configuration for your instance. See Configuring Report Printing for an Instance in Oracle APEX Administration Guide

Parent topic: Printing Report Regions

### 8.12.2 About Printing Reports to PDF and Excel

Learn about printing reports to PDF and Microsoft Excel.

Oracle APEX includes native support for printing basic reports to PDF and Microsoft Excel. If you want full control and advanced layouts for your reports, Oracle recommends using a report server.

Limitations for native PDF and Microsoft Excel:

- A report row in PDF may span multiple lines and may have a single page break. The text is truncated if a row exceeds this limit.
- The maximum text size of a cell in Microsoft Excel is 32k. The text is truncated If a cell exceeds this limit.

Parent topic: Printing Report Regions

### 8.12.3 Configuring Report Printing at the Application Level

Configuring report printing at the application level.

Configure the print server type for an application by editing the Print Server Type attribute on the Application Definition page. The application-level Print Server Type overrides similar settings in Instance Administration.

To configure report printing at the application level:

1. On the Workspace home page, click the App Builder icon.
2. Select an application.
   The Application home page appears.
3. From the application home page, you can access the Definition page in two ways:
   - Click the Edit Application Definition button.
   - From Shared Components:
     - Click Shared Components.
     - Under Application Logic, click Application Definition.

   The Definition page appears.

4. Report Printing:
   1. Print Server Type - Print Server Type controls the print server of the application. This setting overrides similar settings in Administration Services. Options include:
      - Native Printing - Use native printing. No external print server required. Custom report layouts are not supported.
      - Remote Print Server - Choose a remote server of the type "Print Server" that is configured in the Workspace Utilities.
      - Use Instance Settings - Use the Report Printing settings defined at the instance level in Administration Services.
   2. Click Apply Changes.

   Note:

   Document Generator cannot be selected or added as a print server at the application level. It must be configured in Administration Services. To use Document Generator once it is configured, set Print Server Type to Use Instance Settings.
5. (Remote Print Servers only) Authentication Required - Specify whether the remote print server requires authentication.
6. (Remote Print Servers only) Credentials - Select a credential defined in Workspace Utilities.

To add a new Remote Print Server:

7. Click Add Remote Print Server.
   The Add Remote Print Server wizard appears.
8. Print Server Type - Select the Print Server type:
   - Oracle Analytics Publisher - Select this option if you are using a licensed version of Oracle Analytics Publisher. This option enables you to take report query results and convert them from XML to RTF format using Oracle Analytics Publisher. Select this option if you want to upload your own customized RTF or XSL-FO templates for printing reports within APEX.
   - APEX Office Print - Select this option if you are using APEX Office Print.
9. Specify the following:
   1. Name - Enter a name for the remote server object here. Remote Server names must be unique within the workspace.
   2. Static Identifier - Use the Static ID to reference the Remote Server in API calls.
   3. Endpoint URL - Enter the Endpoint URL of the external print server.
   4. HTTPS Host Name - Enter the host name to be matched against the common name (CN) of the remote server's certificate for an HTTPS request. If null, the host name in the given URL is used.
   5. Click Next.
10. Add the Remote Print Server Credentials:
    1. Authentication Required - Determines whether to use authentication for the remote print server. See field-level help for more details.
    2. Name - Enter a descriptive name for the Web Credential. This name must be unique within the workspace.
    3. Static Identifier - Use the Static ID to reference the Web Credential in API calls.
    4. (Oracle Analytics Publisher only) Username - Enter the Username for Basic Authentication. APEX does not store this information encrypted.
    5. (Oracle Analytics Publisher only) Password - Enter the Password for Basic Authentication. APEX stores this information encrypted, so it cannot be retrieved back in clear text.
    6. (APEX Office Print only) API Key - Enter the API key for authentication. APEX stores this information encrypted, so it cannot be retrieved back in clear text.
11. Click Apply Changes.

See Also:

- Creating a Remote Server
- Configuring Report Printing in a Full Development Environment in Oracle APEX Administration Guide

Parent topic: Printing Report Regions

### 8.12.4 About Classic Report Printing Methods

Learn about printing classic report regions.

There are two ways to print classic report regions:

- Configure Printing Attributes for a Report Region. You can print a report region by configuring the Printing Attributes for the region. See Configuring Classic Report Printing Attributes,

- Create a Report Query. You can print a report by defining a report query as a Shared Component. See Printing a Report Region by Defining a Report Query

Both report regions and report queries can be downloaded in the following formats:

- PDF - Adobe Portable Document Format.

- RTF - Microsoft Word Rich Text Format.

- Excel - Microsoft Excel format. Note that when BI Publisher is configured as print server and a custom report layout is specified, the export is not a true `.xls` file because the content is HTML-based.

- HTML

- XML - Extensible Markup Language.

To format either a report region or report query, you associate it with a report layout.

Tip:

You can also have the output format specified by an item that determines the output format at runtime. Select the item that holds the format value. Valid values are PDF, RTF (to open the document in Microsoft Word), XLS (to open the document in Microsoft Excel) and HTML (to download the document as an HTML file).

See Also:

Formatting a Report Region or Report Query Using Report Layouts

Parent topic: Printing Report Regions

### 8.12.5 Configuring Classic Report Printing Attributes

Learn about printing a report region by configurng Printing Attributes.

One approach to printing a report region is to configure Print Attributes. Once configured, these attributes apply only to the current region and cannot be used outside the context of the region.

To configure a classic report region for printing:

1. View the page in Page Designer:
   1. On the Workspace home page, click the App Builder icon.
   2. Select an application.
   3. Select a page.
   Page Designer appears.
2. In the Rendering tab, select the region containing the report.
3. Enable the Attribute, Printing:
   1. In the Property Editor, select the Attributes tab.
   2. Under Printing, set Enabled to On.
4. Configure Printing attributes:
   1. In the Property Editor, select the Printing tab.
   2. Edit the appropriate Printing attributes.

      Tip:

      To view help for an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

5. To save your changes click Save. To save and run the page, click Save and Run Page.

See Also:

- About Classic Report Printing Methods

- Configuring Report Printing for an Instance in Oracle APEX Administration Guide

Parent topic: Printing Report Regions

### 8.12.6 About Report Queries

Learn about report queries.

You can print a report region by defining a report query as a Shared Component. A report query uses a table, a SQL query, or a REST Data Source to identify the data to be extracted. Note that report queries must be SQL statements, not functions returning SQL statements.

See Also:

Printing a Report Region by Defining a Report Query

Parent topic: Printing Report Regions

### 8.12.7 About Report Layouts

Learn about report layouts.

To format a classic report region, interactive report region, or report query, you associate it with a report layout. Using report layouts renders the data in a printer-friendly format. If you do not select a report layout, a default XSL-FO layout is used.

See Also:

Formatting a Report Region or Report Query Using Report Layouts

Parent topic: Printing Report Regions