Accumulation Techniques for Reporting with WebFOCUS Kyle Hachey Systems Engineer Copyright 2007, Information Builders. Slide 1 Workshop Objectives Use WebFOCUS to produce report totals Row and Column Totals Prefix Operators for Counts, Percentages, Minimums, etc. Use Compute to combine selected columns Produce section totals at break points Subtotal and Recompute Review report message options Calculate new summary values with RECAP Apply conditions to operations with WHEN Copyright 2007, Information Builders. Slide 2 Providing Totals in Reports W -4 WebFOCUS enables you to produce commons types of totals in reports: Totals for numeric values in rows Totals for numeric values in columns Totals for sort breaks in a report Grand totals at the end of a report Copyright 2007, Information Builders. Slide 3 W -4 The Compensation and Bonus Estimates Report The payroll manager from the Human Resources department needs a report that displays compensation and bonus estimates for each region and a grand total. Developer Studio Copyright 2007, Information Builders. Slide 4 Performing Numeric Operations W -13 Prefix operators are mathematical functions that are added to the fieldname in a verb phrase. Can only be applied to column fields. Cannot be applied to sort fields (BY or ACROSS). Copyright 2007, Information Builders. Slide 5 Performing Numeric Operations (continued) W -13 Numeric operations include: Calculate the average (or mean) of the values of a column Determine the minimum or maximum value of a column. Sum and count numeric values. Calculate the percentage of a column value to the column total. Copyright 2007, Information Builders. Slide 6 W Prefix Operators Prefix Operator Function CNT Count the number of values for a field. CNT.DST Count the unique occurrences of field values in a sort group. DST Determines the total number of distinct values in a single pass of a data source. SUM Add the values of a field. AVE Calculate the average (mean) value for a field. MIN Identify the lowest value of a field. MAX Identify the highest value of a field. -14 Copyright 2007, Information Builders. Slide 7 Prefix Operators (continued) Prefix Operator Function ASQ Compute the average sum of the squares for standard deviation in statistical analysis. ST Provide the aggregate value for a sort group in section headings and footings. TOT Provide the aggregate value of a field (used primarily in page headings and footings). PCT Calculate the percentage of a column value to the column total. RPCT Determine the percentage of a column value to the row total. PCT.CNT Calculate the percentage of a COUNT to the total count. FST Select the first instance of a field. * LST Select the last instance of a field. * W -14 W - 15 The Total Compensation Estimate Report The payroll manager from the Human Resources department needs a Total Compensation Estimate report that displays the employee count, salary, benefits and combined salary and benefits for each division. Developer Studio Copyright 2007, Information Builders. Slide 9 Review: Providing Totals in Reports W -25 To add all numeric verb objects for a row total, use: To total selected fields only, use: To generate a grand total at the end of a report, use: Copyright 2007, Information Builders. Slide 10 W - 26 The Compensation and Bonus Estimates Report The payroll manager from the Human Resources department needs a Compensation and Bonus Estimates report that displays totals at key break points, such as division and department. Developer Studio Copyright 2007, Information Builders. Slide 11 W Review: Section Totals Type of Function At specific sortfield only. At specific sortfield and all sortfields above it. To Add Numeric Values To Recalculate Computed Fields - 37 W - 38 Customized Formatting Copyright 2007, Information Builders. Slide 13 Customized Formatting Message Option Effect Page Heading Creates a message at the top of each page. W By default, the message appears left justified above first line of text for each page. Page Footing Creates a message at the end of each page. By default, the message appears left justified below last line of text for each page. Options include FOOTING BOTTOM, which displays the footing at the extreme bottom of each page. Section Heading (Subheading) Creates a message above a sort group when the sort values change. Section Footing (Subfooting) Creates a message below a sort group when the sort values change. Report Heading Creates a one-time message at the top of the first page of the report. By default, the message appears left justified above each section of the sort group. By default, the message appears left justified below each section of the sort group. By default, the message appears left justified above first line of text for the report. Report Footing Creates a one-time message at the bottom of the last page of the report. By default, the message appears left justified below the last line of text for the report. - 39 W - 40 The Sales Metrics for All Products Management would like a message in a report that displays the bonus for a Manufacturing Plant, if the plant’s profit exceeds 14 percent. Developer Studio Copyright 2007, Information Builders. Slide 15 W Using Recap Command Evaluation Point DEFINE Evaluated as each record that meets the selection criteria is retrieved from the data source. COMPUTE Evaluated at the Internal Table level after all the data that meets the selection is retrieved and sorted. RECAP Evaluated at the Internal Table level, after totals are accumulated and formats are applied prior to presentation. - 46 W Review: Handling Messages To display a numeric field’s grand total in a heading, footing, subhead or subfoot, use: To use subtotal values in a calculation, use: To display a RECAP value in a customized text line, use: To control conditions under which summary lines appear for each sort field value, use: To minimize the width of a report by suppressing a sort field from displaying, use: <TOT.field RECAP RECAP and SUBFOOT WHEN - 64 Workshop: Review Use WebFOCUS to produce report totals Row and Column Totals Count the number of column values with the prefix operator CNT. Use Compute to combine selected columns Produce section totals at break points Subtotal and Recompute Review report message options Calculate new summary values with RECAP Apply conditions to operations with WHEN Copyright 2007, Information Builders. Slide 18