Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 4.1

Part Number E21674-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Editing Classic Reports

Developers can control report layout, pagination, column sorting, error messages, export links, and column break of Classic reports using the Report Attributes page.

Tip:

With the addition of interactive reports in Oracle Application Express release 3.1, all previous report types are referred to as classic reports. See "Editing Interactive Reports as a Developer".

Topics:

Accessing Classic Report Attributes

To access the Report Attributes page:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select the application.

  3. Select a page.

    The Page Definition appears.

  4. To access the Report Attributes page:

    The Report Attributes page appears and is divided into the following sections:

  5. To learn more about a specific attribute, click the item label.

    When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  6. To save your changes, click Apply Changes.

About Navigation Alternatives

The Report Attribute page is divided into these sections: Column Attributes, Layout and Pagination, Sorting, Messages, Report Export, Break Formatting, and External Processing.

You can access these sections by scrolling down the page, or by clicking a navigation button at the top of the page.

Description of classic_rprt_nav.gif follows
Description of the illustration classic_rprt_nav.gif

When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Altering Classic Report Layout Using Column Attributes

You can use the Column Attributes section of the Report Attributes page to precisely control the report layout. For example, you can use these attributes to alter column heading text, change column positioning, hide a column, create a sum of a column, or select a sort sequence.

To access the Column Attributes:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select the application.

  3. Select a page.

    The Page Definition appears.

  4. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears with the Column Attributes section at the top of the page.

    Description of rpt_att.gif follows
    Description of the illustration rpt_att.gif

    Use the Column Attributes section to control report column appearance and functionality.

    Heading Type identifies how the heading is generated for the report. The Link column indicates if a column link is currently defined. The Edit column indicates whether a column is currently updatable.

    Table 9-5 describes common report column edits.

    Table 9-5 Common Report Column Edits for Classic Reports

    Description Developer Action

    Alter column display sequence.

    Click the up and down arrows to change the column display sequence.

    Alter heading alignment.

    Under Column Alignment, select a column alignment.

    Change column heading text.

    Under Heading, enter different heading text.

    Control which columns display.

    Click Show to indicate a column should display.

    Enable a unique sort sequence.

    Click Sort and select a sequence number from Sort Sequence.

    Any number of columns can be sort enabled. However, at least one column must have a Sort Sequence defined.

    Enable the sum of a column.

    Click Sum to enable the sum of a column.


    You can further refine the attributes of a specific column on the Column Attributes page.

  5. To access the Column Attributes page, click the Edit icon next to the appropriate column Alias.

    To learn more about a specific attribute, click the item label.

    When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

Controlling Classic Report Pagination

You control report pagination by:

  • Including a pagination substitution string in the report template

  • Making selections from the Layout and Pagination section on the Report Attributes page

You control how pagination displays by making selections from the Layout and Pagination attributes on the Report Attributes page.

Topics:

Accessing and Understanding Layout and Pagination Attributes

To access the Layout and Pagination section of the Report Attributes page:

  1. Create a report. See "Creating a Report Using a Wizard".

  2. Navigate to the appropriate Page Definition. See "Accessing the Page Definition".

  3. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  4. Scroll down to Layout and Pagination.

    You use the Layout and Pagination attributes to select a pagination style, determine where pagination occurs, and specify the number of rows that display on each page. Table 9-6 describes the most commonly used Layout and Pagination attributes.

    To learn more about a specific attribute, click the item label. When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

Table 9-6 Layout and Pagination Attributes

Attribute Description

Report Template

Specifies a template to be applied to this report. Report templates provide control over the results of a row from your SQL query. You can choose from many default templates, or pick a custom build template.

Report Attributes Substitution

Enter a value to be in place of the #REPORT_ATTRIBUTES# substitution string. The #REPORT_ATTRIBUTES# substitution string is only replaced in the before rows attribute of the report template.

Show Null Values as

Enter the text you want to display for null columns. The default value is (null).

Pagination Scheme

Specifies a pagination scheme for this report.

Pagination provides the user with information about the number of rows and the current position within the result set. Pagination also defines the style of links or buttons used to navigate to the next or previous page.

For more information, see the Help information for this attribute.

Enable Partial Page Refresh

If enabled, this attribute refreshed the report region when paginating forward and backward in your result set.

Display Position

Defines where pagination occurs.

If you choose to display pagination above a report, the selected report template must support that type of display.

Number of Rows

Defines the maximum number of rows to display on each page.

Number of Rows (Item)

Defines the number of rows displayed by default per page for SQL queries (obtained dynamically from an item). Identify the item in this attribute.

Maximum Row Count

Defines the maximum number of rows to query, for example, rows 1 - 10 of 456.

If you set this attribute to 200, the result would appear as follows:

rows 1 - 10 of more than 200 rows

Note that this attribute impacts performance. Counting fewer rows can improve performance and counting thousands of rows can degrade performance.

Strip HTML

Specify whether to remove HTML tags from the original column values for HTML expressions, column links and report data exported as CSV files.

If you select values from the database that contain HTML tags, then those tags can cause conflicts with the HTML generated for your columns links or HTML expressions. When this option is enabled, only the actual data portion of your column value is used.

Sort Nulls

For reports with column heading sorting, specify if you want null valued columns to sort first or last.

See Also: "Enabling Column Sorting in a Classic Report"


Including Pagination After the Rows in a Classic Report

To include pagination after the rows in a report:

  1. Create a report. See "Creating a Report Using a Wizard".

    Next, select the appropriate Layout and Pagination attributes.

  2. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  3. Under Layout and Pagination, select the following:

    1. Report Template - Select a report template (optional).

    2. Pagination Scheme - Select a pagination scheme.

    3. Display Position - Select a display position.

    4. Number of Rows - Specify how many rows display on each page.

    5. Click Apply Changes.

  4. Edit the report template:

    1. Navigate to the Page Definition. See "Accessing the Page Definition".

    2. Under Templates, select the report template name.

    3. Include the #PAGINATION# substitution string in the After Rows attribute.

    4. Click Apply Changes.

  5. Run the page.

Including Pagination Before the Rows in a Classic Report

To include pagination before the rows in a report:

  1. Create a report. See "Creating a Report Using a Wizard".

    Next, select the appropriate Layout and Pagination attributes.

  2. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  3. Under Layout and Pagination:

    1. Report Template - Select a report template (optional).

    2. Pagination Scheme - Select a pagination scheme.

    3. Display Position - Select a position that contains the word top.

    4. Number of Rows - Specify how many rows display on each page.

    5. Click Apply Changes.

  4. Edit the report template.

    1. Navigate to the Page Definition. See "Accessing the Page Definition".

    2. Under Templates, select the report template name.

    3. Include the #TOP_PAGINATION# substitution string in the Before Rows attribute.

    4. Click Apply Changes.

  5. Run the page.

Enabling Column Sorting in a Classic Report

You enable column sorting on the Report Attributes page.

To enable column sorting:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Under Column Attributes, select the Sort check box next to the columns to be sorted.

  3. From Sort Sequence, select a sequence number.

    Sort Sequence is optional. However, if there are one or more sort enabled columns, then at least one column needs a defined Sort Sequence.

  4. Scroll down to Sorting.

  5. Specify ascending and descending image attributes or click set defaults.

  6. Click Apply Changes.

Tip:

Note that column sorting must be enabled if you want columns with null values to display at the top or end of the report. To learn more about the Sort Nulls attribute, see "Accessing and Understanding Layout and Pagination Attributes".

Adding a Download Link to a Classic Report

You can create a link within a report that enables users to export the report as a comma-delimited file (.csv) file. To add a CSV link to a report you must enable the CSV output option. When using the CSV output option, the report template is not important. You can include a CSV link with any report template that has the CSV export substitution string defined.

Enabling the CSV Output Option in a Classic Report

To use the enable the CSV output option:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Scroll down to Report Export.

  3. From Enable CSV output, select Yes.

  4. (Optional) In the Separator and Enclosed By fields, define the separator and delimiter.

    The default Enclosed By by characters are a double quotation marks (" "). The default delimiter is either a comma or a semicolon depending upon your current NLS settings.

  5. In the Link Label field, enter link text. This text will display in your report and enable users to invoke a download.

  6. (Optional) To specify a default export file name, enter a name in the Filename field.

    By default, the Application Express engine creates an export file name by taking the region name and adding the appropriate file name extension (.csv or .xml).

  7. Click Apply Changes.

Exporting a Classic Report as an XML File or a CSV File

You can export a report as an XML file by selecting a report template.

To export a report as a file:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Scroll down to Layout and Pagination.

  3. From the Report Template list, select export: XML or export: CSV.

    Selecting export: XML prevents the Application Express engine from rendering the page and dumps the content to an XML file.

  4. Click Apply Changes.

Creating a Column Link in a Classic Report

Use the Column Link attributes to create a link from a report to another page in your application or to a URL.

To create a column link to another page:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Under Column Attributes, locate the column to contain the link.

  3. Click the Edit icon next to the column name.

    The Column Attributes page appears.

  4. Scroll down to Column Link.

  5. To create a column link to another page:

    1. From Target, select Page in this Application.

    2. (Optional) In Link Attributes, specify additional column link attributes to be included in the <a href= > tag (for example, a link target, classes, or styles).

    3. In Link Text, enter the text to be displayed as a link, specify an image tag, or pick from the list of default images.

    4. In Page, specify the target page number. To reset the pagination for this page, select Reset Pagination.

    5. In Request, specify the request to be used.

    6. In Clear Cache, specify the pages (that is, the page numbers) on which to clear cache. You can specify multiple pages by listing the page numbers in a comma-delimited list. See "Linking to Interactive Reports".

    7. Use the Name and Value fields to specify session state for a specific item.

  6. Click Apply Changes.

To create a column link to a URL:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Access the Column Attributes page by clicking the Edit icon next to the appropriate column.

    The Column Attributes page appears.

  3. Scroll down to Column Link.

  4. Under Column Link, specify the following:

    1. From Target, select URL.

    2. In Link Text, enter the text to be displayed as a link and select a substitution string.

    3. (Optional) In Link Attributes, specify additional column link attributes to be included in the <a href= > tag (for example, a link target, classes, or styles).

    4. In URL, enter the appropriate address.

  5. Click Apply Changes.

Defining an Updatable Column in a Classic Report

You can make a column updatable by editing Tabular Form Element attributes on the Column Attributes page. Note that the Application Express engine can only perform updates if:

  • A multirow update is defined

  • A PL/SQL process is implemented to process updated data

  • When using the built-in tabular form elements and display types, then the report has to be defined using the type SQL Query (updatable report)

To define updatable column attributes:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Access the Column Attributes page by clicking the Edit icon next to the appropriate column.

    The Column Attributes page appears.

  3. Under Column Attributes, specify the following:

    1. Display As - Select a type of updatable column.

      Use this option to make a column updatable. Updates can only be performed if a multirow update is defined, or a PL/SQL process is implemented to process updated data.

    2. Number/Date Format - Make a selection if you selected the Display As type of Date Picker.

    3. Element Width - Specify the width of the form item.

    4. Number of Rows - Specify the height of a form item (applicable to text areas).

    5. Element Attributes - Define a style or standard form element attribute.

    6. Element Option Attributes - Specify form element attributes for items in a radio group or check box.

  4. Tabular Form Attributes, specify the following:

    1. Default Type - Identify the default type.

    2. Default - Identify the default source.

    3. Reference Table Owner - Identify the owner of the referenced table. This attribute is used to compare references to columns across applications against User Interface Defaults. This reference is manually maintained after being initialized by a wizard, whenever possible.

    4. Reference Table Name - Specify the table or view that this column references. This attribute is used to compare references to columns across applications against User Interface Defaults. This reference is manually maintained after being initialized by a wizard, whenever possible.

    5. Reference Column Name - Specify the column name that this report column references. This attribute is used to compare references to columns across applications against User Interface Defaults. This reference is manually maintained after being initialized by a wizard, whenever possible.

  5. Click Apply Changes.

Defining a Column as a List of Values in a Classic Report

A column can be rendered as Radio Group or a static, named, or query-based LOV. For example, a column can be rendered using a select list or a popup list of values. Or, a column can be rendered as read-only text based on a list of values.

This last approach is an effective strategy when creating display lookup values and is particularly useful in regular, nonupdatable reports. This approach enables you to display the value of a column without having to write a SQL JOIN statement.

To render a report column as a list of values:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Access the Column Attributes page by clicking the Edit icon next to the appropriate column.

    The Column Attributes page appears. Next, specify how the column is rendered (radio group, LOV, select list, and so on).

  3. Under Column Attributes, make a selection from the Display As list.

  4. Scroll down to List of Values.

  5. From Named LOV, make a selection from the List of Values repository.

  6. To include a null value in a list of values:

    1. In Display Null - Select Yes.

    2. Null display value - Enter the display value for the NULL option here.

    3. Null return value - Enter the NULL value to be used for this item's list of values. If you do not specify a value, the default is %null%.

    A column can also have a value that does not display in its list of values.

  7. To define a value that does not display in the list of values:

    1. From Display Extra Value, select Yes.

      The extra value is used if the actual column value is not part of the LOV. In that situation, the actual value is shown. If you do not display extra values, you may end up with the wrong value and unintentionally update your data incorrectly.

    2. In Null Value, specify the value that displays.

    3. If you have not selected a Named LOV, enter the query used to display a select list in the LOV Query field.

  8. If you have not selected a Named LOV, enter the query used to display a select list in List of values definition.

  9. Click Apply Changes.

Controlling When Columns Display in a Classic Report

You can use the Authorization and Condition attributes to control when a column displays.

Authorization enables you to control access to resources (such as a report column) based on predefined user privileges. For example, you could create an authorization scheme in which only managers can view a specific report column. Before you can select an authorization scheme, you must first create it.

A condition is a small unit of logic that enables you to control the display of a column based on a predefined condition type. The condition evaluates to true or false based on the values you enter in the Expressions fields.

To specify Authorization and Condition attributes:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Access the Column Attributes page by clicking the Edit icon next to the appropriate column.

    The Column Attributes page appears.

  3. Under Authorization, make a selection from the Authorization Scheme list.

  4. Under Conditions, make a selection from the Condition Type list, and depending upon your selection, enter an expression or value in the appropriate Expression fields.

    If the authorization is successful and the condition type display evaluates to true, the column displays.

Controlling Column Breaks in a Classic Report

You can control if a specific column repeats and how column breaks appear when printed using Break Formatting attributes. For example, suppose your report displays employee information by department number. If multiple employees are members of the same department, you can increase the readability by specifying the department number only appears once.

To create this type of column break:

  1. Access the Classic Report Attributes page. See "Accessing Classic Report Attributes".

    The Report Attributes page appears.

  2. Scroll down to Break Formatting.

  3. Make a selection from the Breaks list.