|Oracle® Fusion Middleware Oracle Reports User's Guide to Building Reports
11g Release 1 (11.1.1)
Part Number B32122-01
When you create a check printing report, you will sometimes want to create a check "stub" that contains the payment information on the check, as well as the details of the order. The steps in this section will show you how to create a check stub that contains the payee, amount, date, check number, and other payment information.
You will then use the information retrieved by the second query in your data model to print a simple tabular report on the check stub that displays the order information associated with the check.
The steps in this section will show you how to use the tools in the Paper Design view to create a check stub for your check report. You will rearrange the fields you created in the previous section so that every time you run the report, a corresponding check stub will display for every check.
You will also create guidelines in the Paper Design view to help you align the check stub information with the data in the check report.
To create a check stub:
Click the Flex Off button in the toolbar.
Click in the left, vertical ruler and drag your mouse to the right, so that the line is flush with the text "Pay Exactly."
When you release your mouse button, you will notice that a guideline displays, like the one in the following image:
Figure 31-21 Partial Paper Design view of the check report with horizontal guideline
Note:The guideline is a broken black line spanning across this image, to the right of "Pay Exactly."
Click the Order No. boilerplate object (located in the upper left-hand corner of the check) and position it along the new guideline, and below the check image at 3.25 inches (8.5 centimeters), like this:
Figure 31-22 Partial Paper Design view of the check with Order No. boilerplate text
Create another vertical guideline that is aligned next to the first one.
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
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.
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
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:
Figure 31-25 F_ORDER_DATE1 field next to Order Date text
Position the Order Total boilerplate text directly below the Order Date boilerplate text.
Position the F_ORDER_TOTAL1 field next to the Order Total boilerplate text.
Position the Check No. boilerplate text directly below the Order Total boilerplate text.
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
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
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.
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:
Figure 31-28 Customer field in the Paper Design view
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
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).
Position the F_C_STREET_ADDRESS field directly below F_CUSTOMER_NAME1.
Position F_C_CITY directly below F_C_STREET_ADDRESS.
Position the F_C_STATE_PROVINCE field next to F_C_CITY.
Position the F_C_POSTAL_CODE field next to F_C_STATE_PROVINCE.
Position the F_C_COUNTRY_ID field next to F_C_POSTAL_CODE.
Position the F_CUSTOMER_ID field directly below the F_C_CITY field.
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
Now, let us format the information you have just added. Select the following boilerplate text objects in the check stub:
Change the font to Bold, then right-align the text.
Click F_ORDER_TOTAL1, then click the Currency button and the Commas button in the toolbar.
Click the Add Decimals button in the toolbar twice.
Your check stub should now look like this:
Figure 31-31 Formatted check stub
Save your report.
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:
In the Paper Layout view, click the Report Block tool in the tool palette.
Drag a rectangular area for the new layout to display the Report Block Wizard.
In the Report Block Wizard, on the Style page, select Tabular, then click Next.
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.
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:
On the Labels page, change the labels and field widths as follows, then click Next:
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.
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)).
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.
Shift-click the following new labels, then click the Bold button in the toolbar and change the font to Arial, 10 point:
Click the data under Line (F_LINE_ITEM_ID), then click the Align Center button in the toolbar.
Click the data under Unit Price (F_UNIT_PRICE), then click the Align Right button in the toolbar.
While the data is still selected, click the Currency button, Commas button, then click the Add Decimal button twice in the toolbar.
Click the right resize handle and align the right edge of the data field with the Unit Price label.
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.
Save your report.
Your report should now look like this:
Figure 31-33 Final check report with spelled-out cash amounts and stub
Note:You can also compare your results with the example report we have provided, called