Skip Headers
Oracle® Fusion Middleware Oracle Reports User's Guide to Building Reports
11g Release 1 (11.1.1)

Part Number B32122-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

21.5 Add a Format Trigger to Suppress Labels

The steps in this section will show you how to add a format trigger to your report that will prevent labels from being displayed for records will null values.

To create a format trigger:

  1. In the Object Navigator, under the Paper Layout node, navigate to Main Section > Body > M_G_DEPTNO_GRPFR > R_G_DEPTNO > M_G_DEPTNO1_GRPFR > M_G_DEPTNO1_HDR. Or, use the Find field in the Object Navigator to find M_G_DEPTNO1_HDR.

    Tip:

    See the image below for an example of where the frame is located in your Object Navigator. When you select the frame name in the Object Navigator, the corresponding frame will be selected in the Paper Layout view, as well.

    Figure 21-5 Navigating to M_G_DEPTNO1_HDR

    Description of Figure 21-5 follows
    Description of "Figure 21-5 Navigating to M_G_DEPTNO1_HDR "

  2. Double-click the properties icon next to M_G_DEPTNO1_HDR to display the Property Inspector, and set the following properties:

    • Under Advanced Layout, double-click the Format Trigger property field to display the PL/SQL Editor.

  3. In the PL/SQL Editor, use the template to enter the following PL/SQL code:

    function M_G_DEPTNO1_HDRFormatTrigger return boolean is
    begin
      if :count_detail=0 then
         return (FALSE);
      else
         return (TRUE);
      end if;
    end;
    
  4. Click Compile.

    Tip:

    If you receive errors when compiling, compare your code against the code provided. You can also simply copy and paste the code from suppresslabels_code.txt.
  5. When there are no compiling errors, click Close.

  6. Save your report as suppresslabels_your_initials.rdf.