Page 483
That is how the alignment options work; whichever way you chose, the objects are aligned based on that side on the objects. Be careful if you chose an alignment because objects are aligned based on the object that is the most of whatever direction you chose. What this means is that if you set up a field in the position that you want the rest of the objects to align to, say the top, but there is another object that is above your object on the layout, the objects selected to align will align to that higher object not to yours. Be careful of this.
FIG. 18.9
Size Options dialog
box.
The Layout Editor has two sets of tools. Along the top is the toolbar with standard icons for formatting and some special layout icons. Figure 18.10 shows the toolbar. Along the side of the Layout Editor is the Tool Palette. The tool palette is all of the icons for all of the objects to building a report.
The standard icons are Open, Save, Run, Print, Cut, Copy, and Paste. The next icon is the Default Layout tool icon; it has a triangle and a T-square on it. This launches the Default Layout dialog box.
The next four icons are for the different parts of the report. The first is for the body of the report, which is where the data is displayed. The icon has two arrows pointing out. The second is for the margins of the report. This icon has an arrow on the outside pointing in and an arrow on the inside pointing out. The next icon is for the header page of the report. It has an arrow at the top. The last icon is for the trailer page of the report. It has an arrow at the bottom.
Page 484
FIG. 18.10
The toolbar for the Layout Editor.
The next icon, with the padlock, shows that the report is in confine mode. The lock is open when confine mode is off. The next icon with the arrows and the blue box shows that flex is off. The arrows point away from the box if flex is on. The last icon is the Help icon.
The tool palette contains all of the tools necessary for creating a report layout. Figure 18.11 shows the tool palette. It has icons for all of the objects that can be added to the layout and some properties for those objects.
FIG. 18.11
Layout Editor tool palette.
The first 13 icons are standard drawing tools. They are, from right to left: Select, Frame Select, Rotate, Reshape, Magnify, Line, Rounded Rectangle, Rectangle, Ellipse, Arc, Polygon, Polyline, and Freehand. These objects can be added anywhere in the report.
The next four icons are the layout building icons. The first icon is the text icon, showing
the capital T, which adds boilerplate text to the report. The icon with the broken line square is
the frame icon. The icon with the broken square with the arrow is the repeating frame
icon. The next icon with abc in a white box is the field icon. You create fields for database,
formula and summary columns with this icon.
The next set of icons is for adding special objects to the report. The icon with the triangle and the square links files to the report. The icon with what looks like a bar chart adds graphics to
Page 485
the report. The tool that looks like a button adds a button to the report. The button executes a PL/SQL block of code. The next icon is the anchor icon, which anchors two objects together on the layout. The icon with OLE links an OLE2 object to the report. The last icon is the Additional Default Layout icon. This is used to create another layout along with the one that you have already designed, if you add another query to your report.
The last set of icons separated by the big capital T, or the text symbol, are the icons that
control the properties for the drawing objects, the boilerplate objectss and the field objects. The
first icon is the Fill Color icon. This gives the background of an object a color. The second is
the Line Color icon. If you have line objects, or borders, you can give them color. The last icon
is the Text color icon. Your text can have different colors, to illustrate different parts of
the report.
To access an object's properties when the object is selected, right-click it and select Properties, or on the Tools menu select Properties.
To access an object's properties, select the object then right-click it and select Properties, or from the tool bar select the Tools menu and the Properties option.
Some objects in the Layout Editor have the same properties on their property sheets. The properties are separated onto different tabs. The tabs are General Layout, Printer Codes, and Comments. The tabs are used to group similar properties together.
General Layout TabThe General Layout tab has four sections. Figure 18.12 shows the General Layout tab. The first section is Pagination, with four check boxes. The first two are for creating page breaks before and after an object. These are usually placed on outside frames to cause separation of different sections of the report. Page Protect enables you to keep child records from separating onto different pages. If the records won't fit on the current page the report won't print them; it will go to the next page and print them. You have to be careful using this feature because if you have child records that won't fit on a single page, Reports will give you an error. The Keep with Anchoring Object checkbox prevents an anchored or child object from printing on a different page from the object it is anchored to, or its parent. This makes reports much easier to read and understand in many cases.
The next section is Format Trigger. This button launches a program unit editor window, as shown in Figure 18.13. A format trigger is a Boolean function that, when it is true, prints the object and, when it is false, won't. The CD has code examples of how to use format triggers. They are most useful for suppressing information from printing. For example, in a numeric column you might not want to print zeros or negative numbers, only whole, nonzero numbers. You can write code to suppress those numbers from being printed on the report even if they are returned from the query.