9.6.3 Managing Interactive Report Column Attributes

Column attributes enable developers to control the display, features, and behavior of interactive grid columns. Developers edit Column attributes to alter nearly all aspects of column behavior, including altering the layout and appearance, creating validations, defining column links, creating column filters, and adding support for export and printing.

Note:

Some settings are configured at runtime by the report developer and saved as part of the primary or alternate report (for example, column display order, the columns the report is sorted on, and column widths. To learn more about save options, see "Saving Interactive Grids."

9.6.3.1 Editing Interactive Report Column Attributes

Edit Column attributes to precisely control the report layout. For example, you can use these attributes to alter a column heading, change column positioning, hide a column, or control how users can manipulate a column.

To edit column attributes:

To edit column attributes:

  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, locate the region and expand the Columns node.
    The columns appear in the Rendering tab.
  3. Select a column to edit.

    The Property Editor displays the attributes for that column. Attributes are organized in groups. To find a group or attribute, enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

  4. Edit the appropriate 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 edit the column heading, find the Heading group:
    1. Heading - Enter the report column heading text.
    2. Alignment - Select the heading alignment. Note that your alignment selection must be supported by the selected report template.
  6. To control how users can manipulate a column::
    1. Find the Enable Users To group.
    2. For Enable Users To - For each attribute select Yes or No to control how users can manipulate the report.
  7. To save your changes click Save. To save and run the page, click Save and Run Page.

9.6.3.2 Creating a Column Link in an Interactive Report

Use Column 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. 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, locate the region and expand the Columns node.
    The columns appear in the Rendering tab.
  3. Select a column to edit.

    The Property Editor displays the attributes for that column. Attributes are organized in groups. To find a group or attribute, enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

    Tip:

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

  4. Find Identification. From Type, select Link
  5. Find Link and click No Link Defined.
    The Link Builder - Target dialog appears.
  6. To create a link to another page, in the Link Builder - Target dialog:
    1. Type - Select Page in this Application.
    2. Page - Specify the target page number.
    3. Set Items - Select a Name and Value to specify session state for an item.
    4. Clear Session State, Clear Cache - Specify the page numbers on which to clear cache. To specify multiple page, enter a comma-delimited list of page numbers.
    5. Rest Pagination - Select Yes to reset pagination for this page.v
    6. Advanced, Request - Specify the request to be used.
    7. Click OK.
  7. To create a link to a URL, in the Link Builder - Target dialog:
    1. Type - Select URL.
    2. URL - Enter the URL address.
    3. Click OK.
  8. To save your changes click Save. To save and run the page, click Save and Run Page.

9.6.3.3 Defining a Column as a List of Values in an Interactive Report

Add a list of values in an interactive report to improve the speed of built-in filter tools.

To define a report column as a list of values:

  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, locate the region containing the report.
  3. In the Rendering tab, locate the region and expand the Columns node.
    The columns appear in the Rendering tab.
  4. Select a column to edit.

    The Property Editor displays the attributes for that column. Attributes are organized in groups. To find a group or attribute, enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

    Tip:

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

  5. Configure Column Filter:
    1. Find Column Filter.
    2. For Type, select how to derive the filters provided in the report column drop down list. Options include:
      • None - No column filter is provided for this report.

      • Default Based on Column Type - STRING and NUMBER columns derive the list of values from distinct column values. DATE columns derive the list of values from predefined date ranges.

      • Use Defined List of Values to Filter Word Contains - Derive the list of values from a defined list of values SQL query to create a contains filter.

      • Use Named List of Values to Filter Exact Match - Derive the list of values from the named list of values to create an equal filter.

      • Use Named List of Values to Filter Word Contains - Derive the list of values from the named list of values to create a contains filter.

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

9.6.3.4 Formatting Columns in an Interactive Report

You can use HTML expressions in interactive reports to further the customize column display.

To define column formatting:

  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, locate the region and expand the Columns node.
    The columns appear in the Rendering tab.
  3. Select a column to edit.

    The Property Editor displays the attributes for that column. Attributes are organized in groups.

    Tip:

    To find a group or attribute, enter keywords in the Filter Properties field. The Property Editor displays the group or attributes. Or, you can click Go to Group and select the group.

  4. Configure the column format:
    1. Find Column Formatting.
    2. In HTML Expression, enter HTML expressions to be shown in this column. Use #COLUMN# syntax to show column values in HTML.
      • Example 1: Change the background and text colors

        <span style="background-color: yellow; color: red;">#EMPLOYEE_STATUS#</span>
        
      • Example 2: Use Heading 2

        <h2>#EMPLOYEE_NAME#</h2>
        
      • Example 3: Use a dynamic class from the SQL query

        <span class="#COLUMN_CLASS#">#EMPLOYEE_STATUS#</span>
        

        The #COLUMN_CLASS# and #EMPLOYEE_STATUS# substitutions in this example are columns selected in the report SQL query.

      • Example 4: Show an image, and a tooltip on hover

        <img src="#IMAGE_NAME#" alt="#EMPLOYEE_NAME#" title="#EMPLOYEE_NAME#">
        
  5. To save your changes click Save. To save and run the page, click Save and Run Page.

9.6.3.5 About Filtering on Conditional Links in Interactive Report Columns

If an interactive report has a column value that is a link and the link markup is constructed in the report query, attempting to define a filter on this value from the column header menu fails. Oracle Application Express is not be able to render the link correctly in the column header menu because the column values are themselves rendered as links, such that they can be selected to apply the filter. If the developer wanted to conditionally render the link based on query logic, the link may have been defined in the report query as opposed to using the declarative column link support.

For filtering to work on conditional links in columns, developers have two options:

  • Option 1: Use an HTML Expression column:

    1. Add another column to your query that selects the equivalent of the link text from the link and define a column alias of my_link_display. This column alias will be the value used in the column header menu.

    2. Change the my_link column to be of type Hidden Column.

    3. In the my_link_display column, set the column heading to be the same as the my_link column and set HTML Expression to be #MY_LINK#. Keep the default Escape Special Characters as Yes.

    4. Run the page.

      If needed, reorder the columns so that the new column in the same position as the old one. Select the Actions menu and then Select Columns.

    5. Save a new default report. Select the Actions menu, Save Report, and then Save as Default Report Settings.

    The link still renders fine in the report and the column header menu now renders just the my_link_display value which sets the filter correctly.

  • Option 2: Use a custom Column Filter for the link column, where you could query for the link text.