To restrict a calculation to a single reporting unit in a reporting tree, so that the resulting amount is not rolled up to a higher-level unit, you can use the @Unitcode in the Related Forumulas/Rows/Unitscell in the row definition. The @Unitcode is listed in column B of the reporting tree, Unit Name. The values are not rolled up, but the calculation is evaluated at every level of the reporting tree.
Note |
---|
To use this function, you must have a reporting tree associated with the row definition. |
The calculation row can refer to a calculation row or a financial data row.
The calculation is recorded in the Related Formulas/Rows/Unitscell of the row definition, along with the financial data-type restriction. The calculation must use a conditional calculation beginning with an IF @Unitconstruction, such as the following calculation:
IF @Unit(SALES) THEN @100 ELSE 0
This calculation places the amount from row 100 in each column of the report, but only for the Sales unit. If there were multiple units named SALES, the amount would appear in each of those units.
Additionally, row 100 could be a financial data row and further be defined as non-printing, which prevents that amount from appearing in all units in the tree. You can also limit the amount to a single column of the report by using the column restriction, such as column H, to print the value only in specific columns of the report.
You can include ORcombinations in an IFstatement, for example:
IF @Unit(SALES) OR @Unit(SALESWEST) THEN 5 ELSE @100
You can specify a unit in a calculation-type restriction in one of the following ways:
-
Enter a unit name to include those units that match. For example, IF @Unit(SALES)allows the calculation for any unit named SALES, even if there were several SALESunits within the reporting tree.
-
Enter the company and unit name to restrict the calculation to SALESunits in the ACME company only. For example, IF @Unit(ACME:SALES).
-
Enter the full hierarchy code from the reporting tree to restrict the calculation to a specific unit. For example, IF @Unit(SUMMARY^ACME^WEST COAST^SALES).
Note To find the full hierarchy code, right-click in the reporting tree definition, and then select Copy Reporting Unit Identifier (H-code).
Restrict a calculation to a reporting unit
-
In Report Designer, click Row Definitions, and then open the row definition to modify.
-
Double-click the Format Codecell, and then select CAL.
-
Click the Related Formulas/Rows/Unitsand type the conditional calculation starting with an IF @Unitconstruction.