16.14 Formatting a Report Region or Report Query Using Report Layouts

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

16.14.1 About Report Layouts

Learn about report layouts.

To format either a classic 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. The default XSL-FO layout is always used for rendering Interactive Report regions.

When creating and using report layouts, you can:

  • Take advantage of the default layouts for report regions and generic layouts for report queries provided with Oracle APEX.
  • Utilize the built-in XSL-FO-based layouts for report regions by copying and customizing the code. You can edit several attributes for report regions that control page size, fonts, colors, and so on.
  • Create RTF or XSL-FO report layouts to customize the report look and feel. To use RTF report layouts, your APEX service administrator must select the Advanced setting for your site.

Note:

Interactive reports do not support a custom report layout.

See Also:

Configuring Report Printing in Oracle APEX Administration Guide

16.14.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.

See Also:

Configuring Report Printing in Oracle APEX Administration Guide

16.14.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 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.

  5. For Layout Source, review and edit the appropriate information. The options that appear on this page depend on the layout type you select:
    • If you selected Generic Columns:

    1. Report Layout Name - Enter a name to identify the report layout when associating it with a report query or report region.
    2. 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.
    3. Report Column Heading - Defines the look of each cell in the report heading row.
    4. Report Column - Defines the look of each cell for all report rows.
    5. Report Column Width - This width is computed at runtime or can be derived from the report column definition of a report region.
      • If you selected Named Columns:

    1. Layout Name - Enter a name to identify the report layout when associating it with a report query or report region.
    2. Report Layout File - Upload the file containing the report layout.
  6. Click Create Layout.

16.14.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, click Download and save the file to your computer.

    Edit the file and then upload the updated version as a new report layout.

16.14.5 Copying a Report Layout

Copy a report layout to edit and save.

To copy 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, click Copy.
  4. On the Copy Report Layout page:
    1. Copy Report Layout - Select the layout you want to copy.
    2. Report Layout Name - Enter a name for the copy.
    3. Click Copy.