0882-0885

Previous Table of Contents Next

Page 882

The next button in this window is used to toggle the Confine mode in the Layout Editor.
By default, all objects within a frame cannot be moved outside the parent frame unless the Confine mode is off.

NOTE
The only time the Confine mode should be turned off is during copy and paste operations or when the designer specifically needs to move an object to another level in the report. Otherwise, objects and frames could end up overlapping, which causes indeterminate problems at runtime.

The next button is used to turn the Flex mode on and off. With the Flex mode on, whenever a frame is resized, all child objects within the frame are resized accordingly . The last button is used to access the context-sensitive online help system.

Initializing the Reports Environment

Before you develop any reports, you should set up the development environment based on the individual preferences as well as any standards defined by the programming organization. Select Tools Options to present the Tools Options dialog, as shown in Figure 36.3. This dialog box consists of three separate tabs, Preferences, Runtime Parameters, and Runtime Settings.

Figure 36.3.
Tools Options dialog.


You use the Preferences tab to set the specific user preferences. These options define the
parameters used by the reports designer. The first checkbox disables PL/SQL compilation. Typically, Oracle Reports compiles each PL/SQL program unit it is closed. When you disable compilation, all program units are compiled when the report is generated, thereby improving the performance of the tool while the report is being designed.

Page 883

You use the next option, Suppress Define Property Sheets, to instruct the Reports designer whether a property sheet should be automatically opened whenever an object is created. When this box is checked, the object is created with a default name and the user must double-click the object to update the property sheet.

Next, the Suppress List Retrieval on Dialog Box Entry checkbox prevents a list from being displayed whenever a database retrieval dialog box is selected. When suppressing the object list, the designer must know the exact name of the database object to be retrieved. You can use this as a security mechanism to prevent unauthorized access to a user's objects.

Next, you use a listbox to define the unit of measurement to be used in the Layout Editor. The individual options are centimeter, inch, and point. The unit of measurement is used to define the default sizes of the objects on the Layout Editor screen.

You use the Color Palette mode to define how color palettes should be handled in Oracle Reports. The options for the listbox are Editable, Read Only_Shared, and Read Only_Private. Editable means that the color palette of the active report replaces the system color palette, causing the active report to be shown accurately, although the appearance of any inactive reports might not be accurate. Read Only_Shared means that each report's color palette is appended to the system palette until the space reserved for the palette becomes full. If you open any reports that use a different color palette, they might not appear accurately. Finally, Read Only_Private operates the same as shared mode except that Reports assures that the palette is always valid for the active report and any inactive reports might not appear correctly because their color palettes have been cleared to make room for the new report. For the most part, these options are of minimal concern because reports are typically printed in black and white or in a set of basic colors.

The Object Access block of this form defines where report program modules are stored. You can define the storage as File, Database, or File/Database ”and you can use the tool to access reports, PL/SQL libraries, or queries.

You can use the Preferences tab to set up format masks that can be used to display data in the report. These format masks are then available in the Layout Editor. You can also define the format for a field in the layout at runtime; therefore, it is usually not necessary to define them here.

The last part of the Preferences tab is the definition of the default layout parameters. The first two, horizontal gap and vertical gap, define the space between layout frames and displayed fields as defined by the value and the selected unit of measurement for the report. The most difficult aspect of working with Reports is manipulating frames and making sure that all elements are enclosed by the frames where they belong. A novice might want to use a relatively large gap value, whereas a more experienced user can use a smaller value.

Page 884

NOTE
When you work with character mode reports, you don't use the gap values, which results in frames and fields appearing to be exactly the same size . As a result, a complex character mode report can be very difficult to manipulate.

You use the horizontal and vertical interfield values to define the amount of whitespace that should appear between fields on a report. Setting these values to zero causes the fields to be strung together with no whitespace between them.

Creating a Report

To create a new report, either select File New Report from the menu or press Ctrl+E. This creates a report named Untitled in the Object Navigator. After the report is created, you should define its properties using Tools Properties. The Report Properties dialog (shown in Figure 36.4) defines the dimensions for the report. The first selection in this form is for the unit of measurement for the report. Valid values are inch, centimeter, or point and represent the coordinate system to be used for the report. Next, the page height and width are defined based on the actual printable size of a page for the printer (typically 8 inches by 10.5 inches for most laser printers). The total size of the report is determined by multiplying these values by the logical page size of the report. In other words, if the report's physical page size is 8 inches by 10.5 inches and the logical page size is 3 by 2 (as shown in Figure 36.5), the total logical page size is 24 inches wide by 21 inches high.

Figure 36.4.
Report Properties dialog box.


Page 885

Figure 36.5.
Logical pages versus physical pages.


TIP
To facilitate the design of a report that uses the default layout tool, you should specify the initial page width significantly wider than the actual physical size of the page. After the layout elements are properly resized and placed correctly, you can adjust the page size to the proper values.

The remaining parameters for this form should be modified only for special cases. You use the maximum pages parameters to define the maximum sizes of a logical page in the report. Next, you use the panel print order for defining the order in which multiple pages that define a logical page are printed. A value of Across/Down causes the physical pages in Figure 36.5 to be printed in the order 1, 2, 3, 4, 5, 6, whereas Down/Across prints in the order 1, 4, 2, 5, 3, 6. The final parameter in this form defines the direction in which the layout objects are to be placed on the layout. If you select Default, the objects are added to the canvas according to the default direction of the NLS language. Other options are Left to Right or Right to Left.

Constructing a Tabular Report

The first and most basic report that you can develop using Reports is the tabular report. As shown in Figure 36.6, the tabular report appears as a columnar listing of the selected rows. This report lists all the warehouses for Down East Tackle, Inc. with statistical information regarding shipments during the year 1995.

Figure 36.6.
Tabular report.


Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net