Format Fields Oracle Fusion Middleware Online Documentation Library

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.

Building a Summary Report 9-7 Figure 9–5 Summary report with report total formatted

9.4 Examine the Summary Column Properties optional

In this case, the Report Wizard created the summaries according to the requirements of the project. However, in some cases, you may need to manually adjust the settings of summaries to get the exact calculations you wish. By carefully reviewing the summaries created by the Report Wizard, you can gain a better understanding of how summaries work. In this section, you will not be making any changes to the report, you will only be checking the summary settings to better understand summaries. Reviewing summary settings

1. In the Paper Design view, select the percentage value to the right of the of Total

label. 2. Double-click the values to display the Property Inspector. 3. In the Property Inspector, notice the Source property, which indicates the column that is the source of the field. 4. Repeat steps 1 through 3 for all of the summaries in the report. Note down the name of the columns that are the sources for each of these summary fields.

5. In the Object Navigator, double-click the view icon next to the Data Model node

to display the Data Model view.

6. In the Data Model view, double-click TotalTOTALPerSALES_REP_ID in group

G_SALES_REP_ID to display the Property Inspector.

7. In the Property Inspector, notice the values of the properties under Summary:

■ Function is of Total. Change of Total to Sum. Note that the Compute At property disappears because it is unnecessary for a Sum calculation. Change Function back to of Total and Compute At reappears. ■ Source is the TOTAL column, which means that TOTAL is used to compute the summary. ■ Reset At is G_SALES_REP_ID. The value of TotalTOTALPerREPID will reset to zero after each record in G_SALES_REP_ID that is, for each sales representative. 9-8 Oracle Reports Users Guide to Building Reports ■ Compute At is Report. A compute level of Report means that the TotalTOTALPerSALES_REP_ID column will base its percentages on the sum of all of the TOTAL in the entire report. 8. Repeat steps 6 and 7 for each of the summaries in the data model. Notice the differences in the properties for each of the summaries. 9. It can also be a useful exercise to return to the Paper Design view and see where fields that correspond to the summaries are placed in the layout. For example, the field that corresponds to TotalTOTALPerSALES_REP_ID is placed inside the master repeating frame, R_G_SALES_REP_ID, but outside of the detail repeating frame, R_G_CUSTOMER_ID.

9.5 Summary

Congratulations You have successfully created a summary report. You now know how to: ■ create a data model with summaries and lay out the data with the Report Wizard. ■ format fields in the Paper Design view. ■ examine the summaries and their properties. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help .