Previous Next JavaScript must be enabled to correctly display this content

## 16.16 Formatting a Report Region or Report Query Using Report Layouts

Create a report layout to format a report region or report layout.

- About Report Layouts
  Learn about report layouts.
- About Report Layout Options
  Learn about report layout options.
- Creating a Report Layout
  Create a report layout in Shared Components.
- Editing a Report Layout
  Edit a report layout in Shared Components.
- Copying or Subscribing to a Report Layout
  Copy a report layout from the current application or from another application. When copying a report layout from another application, you can also subscribe to it.
- Subscribing to Email Templates
  Subscribe to email templates on the Email Templates, Details page.

Parent topic: Managing Shared Components

### 16.16.1 About Report Layouts

Learn about report layouts.

To format either 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.

Depending on the print server you use, various report layouts are acceptable.

Print Server Type | Layout Types
--- | ---
Oracle Document Generator Pre-built Function | DOCX, XLSX
Oracle Analytics (BI) Publisher | RTF, XSL-FO
APEX Office Print | DOCX, XLSX, PPTX, HTML, Markdown, CSV, TXT, ODS, ODT, ODP
External (Apache FOP) | XSL-FO

Note that Oracle Document Generator Pre-built Function and APEX Office Print do not support XSL-FO layouts.

See Also:

Configuring Report Printing in Oracle APEX Administration Guide

Parent topic: Formatting a Report Region or Report Query Using Report Layouts

### 16.16.2 About Report Layout Options

Learn about report layout options.

You can create a report layout based on one of these options:

- Generic Columns - A generic report layout works with most query result sets. With this layout, the number of columns is automatically adjusted when generating the printable document.

  Many report layout attributes can be defined declaratively for report regions using the built-in XSL-FO default layout. This step allows for creating customizable copies of the built-in default XSL-FO layout, if additional control over the report layout is needed.

- Named Columns - A named column report layout is a query-specific report layout designed to work with a defined list of columns in the query result set. This type of layout is used for custom-designed layouts when precise control of the positioning of page items and query columns is required.

Note that the availability of the Report Layout options depends on how your site administrator configured the report printing settings at your site. All options described in these steps may not be available to you. The following Print Server Types do not support Generic Columns:

- Oracle Document Generator Pre-built Function
- APEX Office Print

See Also:

Configuring Report Printing in Oracle APEX Administration Guide

Parent topic: Formatting a Report Region or Report Query Using Report Layouts

### 16.16.3 Creating a Report Layout

Create a report layout in Shared Components.

To create a report layout:

1. Navigate to the Shared Components page:
   1. On the Workspace home page, click App Builder.
   2. Select an application.
   3. On the Application home page, click Shared Components.

      The Shared Components page appears.

2. Under Files and Reports, click Report Layouts.
3. Click Create.

   The Create Report Layout wizard appears.

4. For Layout Name, enter a name for the Report Layout.
5. For Report Layout Type, select an option and click Next:
   - Generic Columns (XSL-FO) - Uses the default template to populate the report. In the next step, you can customize the default code.
   - Named Columns (XSL-FO) - Requires that you upload an XSL-FO or RTF file in the next step.
   The options that appear on the next page depend on the layout type you select.
6. If you selected Generic Columns:
   1. Report Layout - The report layout is the XSL-FO based definition of the page formatting. All attributes defining page size, orientation, fonts, styles, and so on, are defined in this section.
   2. Report Column Heading - Defines the look of each cell in the report heading row.
7. If you selected Named Columns, upload the file containing the report layout.
8. Click Create Layout.

Parent topic: Formatting a Report Region or Report Query Using Report Layouts

### 16.16.4 Editing a Report Layout

Edit a report layout in Shared Components.

You can edit a generic column report layout directly in Oracle APEX. However, to edit a named column report layout, you must download the current file, edit it, and then upload it again.

To edit a report layout:

1. Navigate to the Shared Components page:
   1. On the Workspace home page, click App Builder.
   2. Select an application.
   3. On the Application home page, click Shared Components.

      The Shared Components page appears.

2. Under Files and Reports, click Report Layouts.
3. On the Report Layouts page, select the layout you want to edit.
4. For generic column layouts, edit the layout directly on the Edit Report Layout page and click Apply Changes.
5. For named column layouts:
   1. Click Download and save the file to your computer.
   2. Edit the file.
   3. Upload the updated version of the file as a new report layout.
   4. For Oracle Document Generator Pre-built Function and APEX Office Print, specify the Data Loop Name.
      The data loop name is used as the name for the array when APEX prepares the JSON data. It is only used when printing Classic Report regions and Interactive Report regions, and only for named column layouts that are not RTF or XSL-FO.
   5. Click Apply Changes.

Parent topic: Formatting a Report Region or Report Query Using Report Layouts

### 16.16.5 Copying or Subscribing to a Report Layout

Copy a report layout from the current application or from another application. When copying a report layout from another application, you can also subscribe to it.

When copying without subscription or copying within the same app, a new Static ID is generated based on the new name.

Tip:

Subscriptions enable developers to reuse shared components across several applications in a workspace. To learn more about subscriptions, see Using Shared Component Subscriptions.

To copy a report layout:

1. Navigate to the Shared Components, Report Layouts page:
   1. On the Workspace home page, click App Builder.
   2. Select an application.
   3. On the Application home page, click Shared Components.

      The Shared Components page appears.

   4. Under Files and Reports, select Report Layouts.

      The Report Layouts page appears. Note that the report includes the following columns: Subscribed From, Subscription Status, and Subscribers.

2. To copy a report layout within the current application:
   1. Search for the report layout and click Copy in the Copy column.
      The Copy Report Layout Wizard appears.
   2. New Report Layout Name - Enter the name of the report layout. Report layout name must be unique within the application.
   3. Click Copy Report Layout.
3. To copy a report layout from another application:
   1. From the Tasks region on the Report Layouts page, click Copy from another app.
      The Copy Report Layout Wizard appears.
   2. Application - Select the application from which you want to copy.
   3. Copy Report Layout - Select the report layout to copy.
   4. Subscribe - Set this flag to On to subscribe to the report layout.
   5. Click Copy Report Layout.

Parent topic: Formatting a Report Region or Report Query Using Report Layouts

### 16.16.6 Subscribing to Email Templates

Subscribe to email templates on the Email Templates, Details page.

Subscriptions enable developers to reuse shared components across several applications in a workspace. To learn more about shared component subscriptions, see Using Shared Component Subscriptions.

Tip:

You can also subscribe to an email template by copying it and enabling the Subscribe option. See Copying or Subscribing to an Email Template.

To subscribe to email templates in the current application:

1. Navigate to the Email Templates page:
   1. Navigate to the Workspace home page.
   2. Click the App Builder icon.
   3. Select an application.
   4. On the Application home page, click Shared Components.
   5. Under Navigation and Search, click Email Templates.

      The Email Templates page appears. Note that the report includes the following columns: Subscribed From, Subscription Status, and Subscribers.

2. Select an email template.
   The Email Templates, Details page appears.
3. To subscribe to an email template:
   1. Find the Subscription region.
   2. Subscription, Subscribe From - Select a master email template to subscribe to and click Apply Changes.
   3. Confirm your selection and click Subscribe.

      The subscribed component is automatically refreshed from the selected master.

4. To refresh a subscription:
   1. Find the Subscription region.
   2. Subscription, Refresh Email Template - If the email template is already subscribed, click Refresh Email Template.
   3. Click Apply Changes.
5. To unsubscribe from an email template:
   1. Find the Subscription region.
   2. Subscription, Unsubscribe - Click Unsubscribe.

Parent topic: Formatting a Report Region or Report Query Using Report Layouts