Methods and differences for hiding layout objects in Oracle Reports

Source: Internet
Author: User

Requirement Description

In reports with specific requirements, some layout objects may be displayed or hidden under certain conditions. There are two methods for developers to develop reports in Oracle reports builder.

  1. Use Format Trigger for programmatic Control
  2. Use Conditional Formatting for control

These two methods are described in detail in different scenarios.

Format Trigger)

A format trigger is a PLSQL function executed before the layout object is set to the last format. This trigger can be used to dynamically change the format attribute of the layout object. The Return Value of the function is of the BOOLEAN type. If the function returns TRUE, the layout object is displayed. If the function returns FALSE, the layout object is hidden.

Note: Hide the layout object,The space occupied by the object in the report design template is not released..

Example:

1 FUNCTION Object1FormatTrigger RETURN BOOLEAN
2 IS
3 BEGIN
4 IF :OBJECT2 IS NULL THEN
5 RETURN FALSE;
6 END IF;
7 RETURN TRUE;
8 END;


Conditional Formatting (condition format)

The condition format is a setting interface, which determines whether the corresponding layout object is displayed based on the authenticity returned by the various conditions added by the developer on the interface.

The format of the entry condition is not as follows:

  1. Select the layout object, press the shortcut key F4 to enter the attribute panel, and select the Conditional Formatting option in the figure.
  2. After opening, you can add, edit, and delete judgment conditions.

Note: The layout object is hidden in the condition format.The space occupied by the design template is also released..

The two are compared as follows:

Method Can I set a condition? Programmable? Release layout space?
Format Trigger Yes Yes No
Conditional Formatting Yes No Yes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.