Creating a summary column

4-58 Oracle Reports Users Guide to Building Reports Given these groups and columns, you might create multiple formulas that apply the cost of living factor COSTOFLIVING to salaries. To avoid duplication of effort, you could create the following PLSQL function and reference it from the formulas: function CompSalsalary number return number is begin return salaryCostofLiving; end; Following are some examples of how you might reference the PLSQL function in formulas: CompSal:RGNSUMSAL or CompSal:SAL + COMM See also Section 2.3.2, About formula columns

4.8.11 Creating a summary column

To create a summary column for totals or subtotals using the Data Wizard:

1. In the Data Model view, click the query that contains the column you want to

total.

2. Choose Tools Data Wizard.

3. On the Totals page, follow the wizard to add the desired summary to your report.

To create a summary column for totals or subtotals using the tool palette:

1. In the Data Model view, single-click the Summary Column tool in the tool palette,

then: ■ To create a column within a group, click in the group at the position you want the column placed in the hierarchy. ■ To create a report-level column, click in an open area of the canvas region.

2. Double-click the new summary column object to display the Property Inspector.

3. Under the Summary node:

■ Set the Function property by choosing the type of summary you want from the list. ■ Set the Source property to the column you want to summarize. Note: For group reports, the Report Wizard and Data Wizard create n summary fields in the data model for each summary column you define: one at each group level above the column being summarized, and one at the report level. For example, if a report is grouped by division, and further grouped by department, then a summary column defined for a salary total would create fields for the sum of salaries for each division and each department group group-level summaries, and the sum of all salaries report-level summary. How To... 4-59 ■ Set the Reset At property to the group at which the summary column value resets. Usage notes For JSP-based Web reports with a Group Above or Matrix style, if any summary column values are not correctly left-aligned when you click the Run Web Layout button in the toolbar or choose Program Run Web Layout, you can implement the following workaround to align the values: ■ In the Web Source view, locate the section where the summary column is defined, and delete the following line to remove the extra space: th class=summary_column_name th See also Section 2.3.1, About summary columns Chapter 9, Building a Summary Report Chapter 13, Building a Group Left Summary Report

4.8.12 Creating or editing a placeholder column