In the previous blog posts we looked at how Crystal Reports for Enterprise 4.0 in general is able to leverage hierarchies from an underlying BEx query. This time I would like to explain how Crystal Reports for Enterprise 4.0 is going to leverage hierarchies when there is a hierarchy variable and a hierarchy node variable in place.
So first of all lets take a look at the BEx query:
As you can see the BEx query contains several characteristics, several keyfigures and the characteristic Product in the rows.
For the filter area you can see that we have a hierarchy and a hierarchy node variable.
In regards to the hierarchies you can see here that for characteristic Product we have 2 hierarchies available.
Now after we established a connection with Crystal Reports for Enterprise 4.0 we are being presented with the common query panel.
Here you can see that Crystal Reports for Enterprise is presenting us with three hierarchies (not just 2). We can see the Product Hierarchy 1 and Product Hierarchy 2 which are modeled hierarchies in SAP BW but we also are presented with a hierarchy called “Product” (the first entry).
The hierarchy “Product” is being called a “default hierarchy”, which is especially important in the case like ours, where we have a hierarchy variable – so we can not select a fixed hierrarchy as part of our resultset.
In the query panel we can then open the Member Selector for the hierarchy.
You might have noticed that the query panel did not ask for a hierarchy selection at this point and therefore we are presented with the default hierarchy.
Now when we execute our report we are being presented with a real hierarchical prompting inside the Crystal Reports designer
The prompting in Crystal Reports for Enterprise is also able to identify the dependencies, which means in case I did select the Product Hierarchy 2 with the hierarchy nodes Laptops and Handheld Devices….
… but then switch to Product Hierarchy 1…
.. the Hierarchy Node variable is being “cleaned out” as the values are invalid (or can be invalid) at that point.
In addition Crystal Reports for Enterprise is now using the selected hierarchy node as the starting point of the report.
I hope that this is giving you a good introduction to how Crystal Reports for Enterprise 4.0 is able to leverage hierarchy and hierarchy node variables.