|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Hierarchical SummariesHierarchical Groups were one of the less understood features in Crystal Reports 8.0, but it's gotten better and more useful over time.This feature enabled you to process data that had a hierarchical relationship in a database table. Potential use of this feature included organization charts, product bill of materials, and general ledger chart of accounts. But you still had to have your application calculate the totals for the hierarchy. Well, Crystal Reports 8.5 enables you to specify that a total is a Hierarchical summary. When you create the summary, an option is available on the form ("Sum across Hierarchy"). Select that, where you would like to use this feature. This will also appear as a new option when you select "Change Summary Operation" on an existing summary field. The release of Crystal Reports Xi included some excellent new features for Hierarchical Groups. The groups were now nested, and with dynamic horizontal position, and hierarchical summaries we had an excellent solution to financial and hierarchical costing reports. But there was one new limitation as well. Hierarchical summaries could no longer be used in a formula. In a way, this was a fix to the problem that if you used the hierarchical summaries in a Crystal Reports 8.5, 9, or 10 report, the value that you got was the regular summary. It was not the total for that level of the hierarchy. Ido Millet tells us at every conference that a report becomes useful when you include a ratio in it. You might want to take a report with one hierarchical summary and calculate a value from it. If you had two or more summaries, you often want to subtract or divide one from the other. Our solution to this problem uses an array for each field you want to summarize. Each element of the array accumulates values for each level. You need to reset the total for that level in the header section, and you can display the summary for that level in the group footer. A formula in the report header creates the array and sets all the elements to zero. You must have enough elements to support the maximum number of levels. You need an array for each field you are summarizing. |