Create a check stub in the Paper Design view

31-18 Oracle Reports Users Guide to Building Reports Figure 31–22 Partial Paper Design view of the check with Order No. boilerplate text 5. Create another vertical guideline that is aligned next to the first one.

6. Click the F_ORDER_ID field in the above image, it is the field with 2354 and

position it next to the Order No. field, like this: Figure 31–23 Order No. and F_ORDER_ID fields in the Paper Design view

7. Now, click the Order Date boilerplate text and position it directly below Order

No., like this: Figure 31–24 Order Date field in the Paper Design view

8. Click F_ORDER_DATE1 the copy you made of the F_ORDER_DATE field,

which you can locate using the Object Navigator, and position the field next to the Order Date boilerplate text, like this: Note: You can always select your fields in the Object Navigator, under Paper Layout Main Section Body, and these fields will appear selected in the Paper Design view. Building a Check Printing Report with Spelled-Out Cash Amounts 31-19 Figure 31–25 F_ORDER_DATE1 field next to Order Date text

9. Position the Order Total boilerplate text directly below the Order Date boilerplate

text.

10. Position the F_ORDER_TOTAL1 field next to the Order Total boilerplate text.

11. Position the Check No. boilerplate text directly below the Order Total boilerplate

text.

12. Position F_CHECK_NO1 next to the Check No. boilerplate text.

The check stub should now look like this: Figure 31–26 Partial check stub in Paper Design view

13. Create another pair of vertical guidelines that are aligned with the box containing

the date, amount, and check number. The guidelines should appear here: Figure 31–27 Second vertical guideline in the Paper Design view

14. Click the Customer boilerplate text, and position it so that it is vertically aligned

with the second guideline, and horizontally aligned with the Order No. text at 3.25 inches 8.5 centimeters, like this: Note: To create this guideline, click in the left-hand ruler, then drag your mouse until the line is aligned to the left of box containing Date, Check No., and Amount. 31-20 Oracle Reports Users Guide to Building Reports Figure 31–28 Customer field in the Paper Design view

15. Position the F_CUSTOMER_NAME1 field next to the Customer boilerplate text

so that these layout objects look like this: Figure 31–29 Customer and F_CUSTOMER_NAME1 fields

16. Position the F_C_STREET_ADDRESS field directly below F_CUSTOMER_

NAME1 .

17. Position F_C_CITY directly below F_C_STREET_ADDRESS.

18. Position the F_C_STATE_PROVINCE field next to F_C_CITY.

19. Position the F_C_POSTAL_CODE field next to F_C_STATE_PROVINCE.

20. Position the F_C_COUNTRY_ID field next to F_C_POSTAL_CODE.

21. Position the F_CUSTOMER_ID field directly below the F_C_CITY field.

22. Position the Customer No. boilerplate text B_CUSTOMER_ID directly to the left

of the F_CUSTOMER_ID field, so that this portion of the check stub should now look like this: Figure 31–30 Partial check stub in the Paper Design view

23. Now, let us format the information you have just added. Select the following

boilerplate text objects in the check stub: ■ Order No. ■ Order Date ■ Order Total ■ Check No. ■ Customer ■ Customer No.

24. Change the font to Bold, then right-align the text.

Tip: If you have difficulty fitting the F_CUSTOMER_NAME1 field into the provided space, you may need to resize the field. To do so, select the field, then drag the right middle resize handle to the left, making sure that there is still enough space for the customer name Harrison Sutherland. Building a Check Printing Report with Spelled-Out Cash Amounts 31-21

25. Click F_ORDER_TOTAL1, then click the Currency button and the Commas

button in the toolbar. 26. Click the Add Decimals button in the toolbar twice. Your check stub should now look like this: Figure 31–31 Formatted check stub 27. Save your report.

31.6.2 Add order details to the check stub

In the previous section, you created a check stub that displays the payment information, that is a copy of the information on the check itself. The steps in this section will show you how to add the details of the order to the check stub by creating a simple tabular report. You will use the Report Block Wizard to create the simple tabular report, then format the data in the Paper Design view. To add order details:

1. In the Paper Layout view, click the Report Block tool in the tool palette.

2. Drag a rectangular area for the new layout to display the Report Block Wizard.

3. In the Report Block Wizard, on the Style page, select Tabular, then click Next.

4. On the Groups page, click G_LINE_ITEM_ID and click Down in the Available

Groups list to specify the Print Direction and move this group to the Displayed Groups list, then click Next. 5. On the Fields page, click each of the following fields in the Available Fields list, then click the right arrow to move them to the Displayed Fields list, then click Next : ■ LINE_ITEM_ID ■ PRODUCT_ID ■ PRODUCT_NAME ■ UNIT_PRICE ■ QUANTITY 6. On the Labels page, change the labels and field widths as follows, then click Next: Fields Labels Width LINE_ITEM_ID Line 2 PRODUCT_ID Product ID 4 PRODUCT_NAME Product Name 40 UNIT_PRICE Unit Price 4 QUANTITY Quantity 4 31-22 Oracle Reports Users Guide to Building Reports

7. On the Template page, select No template, then click Finish to display your report

layout in the Paper Layout view, with the new fields and layout objects displaying below the original layout objects. 8. In the Paper Layout view, make sure the new fields and layout objects are located within the R_G_ORDER_ID repeating frame, and that all the layout objects fit on a single page within 8.75 inches 22 centimeters. 9. Click the Paper Design button in the toolbar to run and display your report in the Paper Design view. It should look something like this: Figure 31–32 Check printing report with non-formatted order details Since the new report block is not formatted, let us format the data to look like the rest of the report.

10. Shift-click the following new labels, then click the Bold button in the toolbar and

change the font to Arial, 10 point: ■ Line ■ Product ID ■ Product Name ■ Unit Price ■ Quantity 11. Click the data under Line F_LINE_ITEM_ID, then click the Align Center button in the toolbar.

12. Click the data under Unit Price F_UNIT_PRICE, then click the Align Right

button in the toolbar.

13. While the data is still selected, click the Currency button, Commas button, then

click the Add Decimal button twice in the toolbar. 14. Click the right resize handle and align the right edge of the data field with the Unit Price label. Building a Check Printing Report with Spelled-Out Cash Amounts 31-23

15. Click the data under Quantity F_QUANTITY, then click the Align Right button

in the toolbar, then resize the field so that the right edge of the data field is aligned with the Quantity label. 16. Save your report. Your report should now look like this: Figure 31–33 Final check report with spelled-out cash amounts and stub

31.7 Summary

Congratulations You have successfully built a report with spelled-out cash amounts on the check, as well as the payment and order details on the check stub. You now know how to: ■ use the Report Wizard to create a simple report definition. ■ use the tools in the Paper Layout view to import a blank check image and add fields to the report. ■ create a PLSQL function that returns spelled-out numbers. ■ create a formula column based on a PLSQL function. ■ use the tools in the Data Model view to link two queries. ■ use the tools in the Paper Design view to format your check printing report to print on a desired check. ■ create a check stub that displays a duplicate of the information on the check. ■ use the Report Block Wizard to create a simple tabular report that displays order details on a check stub. Note: You can also compare your results with the example report we have provided, called spellcash.rdf.