16.12 Managing Report Output
Learn how to print a report region by defining a report query and how to use a report layout to format a report region.
- Printing a Report Region by Defining a Report Query
Print a report region by defining a report query. - Formatting a Report Region or Report Query Using Report Layouts
Create a report layout to format a report region or report layout.
Parent topic: Managing Shared Components
16.12.1 Printing a Report Region by Defining a Report Query
Print a report region by defining a report query.
Parent topic: Managing Report Output
16.12.1.1 About Report Queries
You can print a report region by defining a report query as a Shared Component. A report query identifies the data to be extracted. Unlike SQL statements contained in regions, report queries contain SQL statements that are validated when you save the query. Note that report queries must be SQL statements, not functions returning SQL statements.
You can associate a report query with a report layout and download it as a formatted document. If no report layout is selected, a generic layout is used. The generic layout is intended to be used to test and verify a report query. When using the generic layout option and multiple source queries are defined, only the first result set is included in the print document. The reports can include session state of the current application.
To make these reports available to end users, you then integrate them with an application. For example, you can associate a report query with a button, list item, branch, or other navigational component that enables you to use URLs as targets. Selecting that item then initiates the printing process.
Parent topic: Printing a Report Region by Defining a Report Query
16.12.1.2 Creating a Report Query
Note that the availability of the report query options depends on how your service administrator configures report printing for your instance. All options described in these steps may not be available to you.
To create a report query:
- Navigate to the Shared Components page:
- Under Files and Reports, click Report Queries.
- Click Create.
- Report Query Definition - Specify the following:
- Source Queries - For SQL Query, .
- SQL Query - Enter a SQL statement to define the report query.
- Set Bind Variables - Click Set Bind Variables to be able to enter in values for each bind variable and test the query to ensure the expected output is returned.
- Click Next.
- Download Definition:
- Upload Report Layout:
- Report Layout Source - Specify whether to use the generic built-in report layout or a custom report layout.
- Layout Name - Enter a layout name (optional). The default is the report query name.
- Report Layout File - Select the file to upload.
- Click Next.
- Confirm displays the following information:
See Also:
Parent topic: Printing a Report Region by Defining a Report Query
16.12.1.3 Editing a Report Query
To edit a report query:
- Navigate to the Shared Components page:
- Under Files and Reports, click Report Queries.
- Select the appropriate report query.
- On the Edit page, edit the appropriate attributes.
- Click Apply Changes.
Parent topic: Printing a Report Region by Defining a Report Query
16.12.1.4 Copying a Report Query
To copy a report query:
Parent topic: Printing a Report Region by Defining a Report Query
16.12.2 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
- About Report Layout Options
- Creating a Report Layout
- Editing a Report Layout
- Copying a Report Layout
Parent topic: Managing Report Output
16.12.2.1 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.12.2.2 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.12.2.4 Editing a Report Layout
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:
16.12.2.5 Copying a Report Layout
You can copy a report layout to edit and save.
To copy a report layout:
- Navigate to the Shared Components page:
- Under Files and Reports, click Report Layouts.
- On the Report Layouts page, click Copy.
- On the Copy Report Layout page:
- Copy Report Layout - Select the layout you want to copy.
- Report Layout Name - Enter a name for the copy.
- Click Copy.