Suppress Redundant Values Oracle Fusion Middleware Online Documentation Library

Building an Intermixed Fields Report 20-7 END;

6. Click Compile

7. Click Close.

To add the format trigger:

1. In the Object Navigator, type F_DEPARTMENT in the Find field to select it.

2. Double-click the properties icon to the left of F_DEPARTMENT to display the

Property Inspector, and set the following properties: ■ Under Advanced Layout, double-click the Format Trigger property field to display the PLSQL Editor. 3. In the PLSQL Editor, use the template to enter the following PLSQL code: function F_DEPARTMENTFormatTrigger return boolean is begin If global.prev_val = :department then returnfalse; Else global.prev_val := :department; returntrue; END IF; end;

4. Click Compile.

5. Click Close.

6. Click the title bar of the Report Editor to make it the active window. Return to the Paper Design view if you are not already there. Notice the change in your report output. Figure 20–7 Final report output displayed in the Paper Design view

7. Save the report.

20-8 Oracle Reports Users Guide to Building Reports

20.7 Summary

Congratulations You have successfully created an intermixed fields report. You now know how to: ■ create a data model and layout in the Report Wizard. ■ add a formula column to the detail group. ■ add a field in the Report Wizard. ■ remove a redundant field in the Paper Design view. ■ suppress values in a Format Trigger. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help . Building a Report that Suppresses Labels 21-1 21 Building a Report that Suppresses Labels In this chapter, you will learn about reports that suppress the display of field labels. By following the steps in this chapter, you can generate the report output shown in Figure 21–1 . Notice how the field labels for Department 40 do not display because no detail records were found Figure 21–1 Suppressed labels report output Concepts A default masterdetail report must print a detail label or field, even if there are neither fetched detail records nor values for user-created columns. This example demonstrates how to suppress the detail information for a single record, but allow the other masterdetail records to display. Data Relationships ■ This report uses a masterdetail data model. You will also create a formula column in the detail group whose sole function is to return a value; this ensures the detail group contains at least one column that will always return a value each time a detail record is returned as opposed to, for example, a null value. ■ You will create a summary to count the number of times this formula column returns a value. In the layout, you will create a format trigger that references the summary to determine if the detail labels should be displayed. Doing so provides a reliable method for determining the existence of detail records.