Add Text to Display when No Records Display

21-8 Oracle Reports Users Guide to Building Reports ■ F_JOB Your Object Navigator should look like this: Figure 21–6 Selected objects in the Object Navigator

9. In the Paper Layout view, click the Confine On button in the toolbar.

10. Choose Layout Bring to Front.

By choosing this menu option, Reports Builder will display the records in front of the boilerplate text you just created. If there are no records, the boilerplate text will display. The Object Navigator should now look like this: Note: If this menu option is greyed out, click the title bar of the Paper Layout view, but do not click on the canvas itself. This menu option is only available when the Paper Layout view is active. Building a Report that Suppresses Labels 21-9 Figure 21–7 Selected objects brought forward in the Object Navigator Now, we need to change the fill color of the parent frame, so that you cannot see the boilerplate text behind the detail records.

11. In the Object Navigator, click M_G_DEPTNO1_GRPFR so that it is the only object

selected. In the Paper Layout view, you should see this same frame selected. 12. Click the Fill Color tool in the tool palette, and change the fill color to light blue, so that it matches the template. 13. Click the Paper Design button in the toolbar to run and display your report in the Paper Design view. Your report should look something like this: Note: You will notice that the boilerplate text, B_1, is now located directly under the parent frame, M_G_DEPTNO1_GRPFR. This placement means that the records displayed by the objects in the repeating frame, R_G_DEPTNO1, will display in front of the boilerplate text. The boilerplate text, which says that no detail records were retrieved, only displays when no records are present. 21-10 Oracle Reports Users Guide to Building Reports Figure 21–8 Final Paper Output of the Suppressing Labels Report 14. Save your report as suppresslabels_your_initials.rdf.

21.7 Summary

Congratulations You have successfully built a report that suppresses labels when no data is retrieved. You now know how to: ■ manually create and link two queries. ■ create a formula column and a summary column. ■ create a default layout in the Report Wizard. ■ create a format trigger that suppresses the field labels when no detail records are displayed. ■ added boilerplate text and manipulated the layout. 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 . Note: Notice how the record for Department 40 shows the boilerplate text you added, and the field names for the record are suppressed. Building a Report with Conditional Highlighting 22-1 22 Building a Report with Conditional Highlighting In this chapter, you will learn about reports that display highlighted values based on one or more conditions. By following the steps in this chapter, you can generate the report output shown in Figure 22–1 . Figure 22–1 Conditional highlighting report output Concepts ■ You can create a format trigger that will change the appearance of retrieved data depending on factors you define. ■ You can use the Conditional Formatting dialog box to create this format trigger, or you can manually create them using the PLSQL Editor. The steps in this example will show you how to use the Conditional Formatting dialog box, then display the code in the PLSQL Editor to see how the format trigger was automatically generated by Reports Builder.