Create a Data Model and a Group Above Layout

9-4 Oracle Reports Users Guide to Building Reports Figure 9–2 Groups page of the Report Wizard

10. On the Fields page, click the double right arrows to move all of the fields to

the Displayed Fields list, then click Next. 11. On the Totals page, click TOTAL in the Available Fields list, then click Sum. Given the data model you are using, this step will create two summary columns for you: ■ SumTOTALPerSALES_REP_ID sums the total of TOTAL for each value of SALES_REP_ID that is, for each sales representative. ■ SumTOTALPerReport sums the total of TOTAL for the entire report that is, for all sales representatives.

12. Still on the Totals page, click of Total. Given the data model you are using, this

step will create two columns for you: ■ TotalTOTALPerCUSTOMER_ID calculates dollars for each customer CUSTOMER_ID as a percentage of the total dollars for each sales representative SALES_REP_ID. ■ TotalTOTALPerSALES_REP_ID calculates dollars for each sales representative SALES_REP_ID as a percentage of the total dollars in the entire report. Building a Summary Report 9-5 Figure 9–3 Totals page of Report Wizard

13. Click Next.

14. On the Labels page, change the labels as follows, then click Next:

15. On the Template page, make sure Beige is selected under Predefined Template.

16. Click Finish to display your report output in the Paper Design view.

9.3 Format Fields

In the Paper Design view, notice the Total field. The values are neither aligned nor displayed as monetary amounts. You can quickly rectify this in the Paper Design view. To assign a format mask to monetary values:

1. In the Paper Design view, select the first number value underneath the Dollars

label. Notice that all of the values are immediately selected, indicating that you can change their properties simultaneously.

2. Click the Currency button in the toolbar. A currency symbol immediately appears

next to all of the values.

3. Click the Add Decimal Place button twice. Two decimal places are added to the

right of the decimal point.

4. Resize the field by clicking and dragging the rightmost handle of the field

approximately 0.5 inches 1.5 centimeters to the left. Fields Labels SALES_REP_ID Sales Rep CUSTOMER_ID Customer TOTAL Dollars Tip: If you are familiar with format mask syntax, you could now right-click the field values, choose Property Inspector, and choose or manually enter a value for the Format Mask property. 9-6 Oracle Reports Users Guide to Building Reports 5. Click the Align Right button. All of the values are immediately right aligned. 6. Select the Dollars label itself. 7. Click the Align Right button.

8. Select the number value to the right of the Total: label.

9. Click the Currency button. A currency symbol immediately appears next to all of the values. 10. Click the Add Decimal Place button twice. Two decimal places are added to the right of the decimal point. 11. Click the Align Right button. All of the values are immediately right aligned. Figure 9–4 Summary report output with monetary values formatted

12. Go to the end of the report. The last value on the last page should be a summary

labelled Total:, which sums the values of TOTAL across the entire report. 13. Select the unformatted number to the right of the Total: label. 14. Click and drag this field until its right edge is aligned with the right edge of the values in the Total column.

15. Click the Currency button in the toolbar. A currency symbol immediately appears

next to the Total value.

16. Click the Add Decimal Place button twice. Two decimal places are added to the

right of the decimal point.

17. Click the Align Right button. All of the values are immediately right aligned.

18. Save the report as summaryb_your_initials.rdf.