0897-0900

Previous Table of Contents Next

Page 897

NOTE
For some reports , it might be necessary to construct a title area or footer area that is larger than the default 1/2 inch. By resizing the report body, you can enlarge or shrink the margins.

Once the report body is resized, you lay out the report manually. Select the Frame tool and create a frame that is nearly the same size as the entire report body. Within this frame, create a repeating frame that is about the same size as the first frame. Double-click in the repeating frame to set its properties using the dialog box shown in Figure 36.18. Change the name of the frame to R_orders and set the source for the frame to G_orders. Also, make sure that only one order is printed on a page by setting the maximum records per page to 1.

Figure 36.18. The Repeating Frame property sheet.


Next, you should create the document title at the top of the report. First, select the font to be used for the title bar using Tools Font. Using the Font dialog box, shown in Figure 36.19, select Arial font with the style Bold Italic and the size of 36 points. (Note that when a font is selected, a sample of the text appears within the dialog box, showing how the font will look.) When the font is selected, click the OK button to select the font.

Figure 36.19.
The Font dialog box.


Page 898

Using the Text tool, click within the Layout Editor canvas and type Shipping Document in the box that appears. After the text is entered, click outside the textbox to complete the entry. Modify the attributes of this boilerplate text by choosing a black fill with white text. Resize the text by holding down the Shift key while clicking the mouse within the R_orders frame and then selecting Tools Size Objects to display the dialog box. As shown in Figure 36.20, select the Largest radio button under Width to adjust the size of the text to match the enclosing frame.

Figure 36.20.
The Size Objects dialog box.


At this point, position the title bar by selecting Tools Align Objects. Select to align these objects to each other as well as by the horizontal center, as shown in Figure 36.21.

Figure 36.21. The Align Objects dialog box.

To add the company logo, choose the Link File tool and drag a box at the appropriate position on the report. An appears on the canvas where the object is created. Double-click this object to present the External Boilerplate Properties dialog box. (See Figure 36.22.) Change the name of the object to B_logo and select Image for the object format; then enter the filename for the logo image (in this case, downeast.tif). Click the OK button, and the graphics image appears on the report canvas.

You should then add the company name and address header to the report with the Text tool and position them next to the logo. For this example, you create the company name with a font that is different from the font of the address, and you can align the two objects with the Align Objects tool. You then join this heading as a single group by pressing Ctrl+G or selecting Arrange Group .

Page 899

Figure 36.22. Linking an external graphics image file.


Next, lay out the remaining report sections by creating three frames on the report canvas as containers for the remaining report objects. These frames correspond to the boxes that appear on the report and serve as containers for the enclosed information. Therefore, you do not need to modify the default properties for the frames in any way. To create the boxes, select the Rounded Rectangle tool and drag a rectangle within the appropriate frame. When the mouse button is released, the object appears as a rectangle with rounded corners. Select the fill palette to fill the rectangle with black. Copy the rectangle to the Clipboard with Ctrl+C (or you can use Edit Copy or the iconic button) and then paste it back to the canvas with the Ctrl+V key combination. Using the mouse, drag the new box above and to the left of the previous box and change the box's fill pattern to white (or gray for the order data). The object now appears as a rounded box with a drop shadow.

To draw the remaining graphical lines, select the Line tool and draw horizontal and vertical lines as needed. Make sure that the lines are exactly the same size as the boxes and that they are properly aligned with the edge of their respective boxes.

TIP
One technique that works well (and saves a lot of time and frustration) is to create the lines smaller than needed and then use the Size Objects and Align Objects dialog boxes to adjust the lines properly. When you use the Align Objects tool, the alignment direction determines where the objects are located. For example, if the horizontal alignment is left, the objects are positioned to align with the left edge of the leftmost object on the canvas, depending on the container frames and confine mode in operation. Also, the Stack and Distribute options are extremely useful for aligning the objects against each other or for spacing them evenly.

Page 900

You can add the remaining heading text and field prompts using the Text tool in the boxes as needed. Use the exhibit as a guideline to complete the boilerplate text.

The form layout is now complete, and you can add the query data to the form to finish the report. So far, all the information that is placed in the report is contained within the R_orders repeating frame, which is associated with the G_orders data block. Therefore, you can add the data for this block directly to the report using the Field tool. In the Order Data box at the bottom of the report, drag a box that will hold the order number field, ORDER_NO. This box will be created with an F_1 appearing within the box. Double-click this field to display the Object Properties dialog box for this object. As shown in Figure 36.23, change the name of the object to F_order_no and select ORDER_NO as the data source for this column.

Figure 36.23.
The Layout Field properties dialog.


To complete the report data for this block, create fields for order_date, ship_date, and warehouse in the Order Data box, and create fields for cust_no, cust_name, address, and city in the Ship To box.

To associate data with a record group, you must create and associate a repeating frame with its appropriate data group. Unfortunately, because no boilerplate objects can intersect with a frame that does not entirely close it, you need to create five separate repeating frames within the Items box so that they do not intersect the separating lines. These frames, which should be associated with the G_order_items group, should be the same size and aligned at the top. Within each of these frames, create the appropriate layout field and set its properties as needed.
This completes the shipping document report, which you can save as needed.

Working with Summary and Formula Columns

So far, this chapter has explored the display and manipulation of data retrieved directly as the result of a query. One of the most powerful features of Reports 2.5 is its capability to provide client-side computations to deliver added functionality to the reporting environment. An example of a report that includes these types of computations was shown in Figure 36.16.

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