cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping

Former Member
0 Kudos
73

In Crystal Report, can we create Hierarchy (using Group), and then restrict them to display only certain Hierarchy for each Group?

Take this example: Product ID as hierarchy in my BW Query. I have the following hierarchy:

World

-->US

-


>South US

-


>Product ID1

-


>Product ID2

-


>Product ID3

-


>North US

-


>Product ID1

-


>Product ID2

-


>Product ID3

-->Europe

-


>South Europe

-


>Product ID1

-


>Product ID2

-


>North Europe

-


>Product ID1

-->Asia

-


>South Asia

-


>Product ID1

-


>Product ID2

In CR, I can create a Group and use Product Parent ID and form the Hierarchy. So I have one Product Hierarchy (Group) that consist of all it sub-group (Child).

However, is there a way for me to create 3 separate group (US, Europe and Asia) separately and independently so that I can place them into different section in the CR, and can drill-down to the each of the sub-group accordingly? Example:

Group 1:

-->Europe

-


>South Europe

-


>Product ID1

-


>Product ID2

Group 2:

-->Asia

-


>South Asia

-


>Product ID1

-


>Product ID2

Group 3:

-


>North US

-


>Product ID1

-


>Product ID2

-


>Product ID3

How can we restrict the Hierarchy Node based on the Group? Example: Group 1 selection = South Europe, Group 2 selection = South Asia, Group 3 selection = North US.

Can this be done in CR?

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use a formula to set the World Region, and group on it first. Then Group on the region. You can specify the order you want to see each group in.

Edited by: DebiHerbert on Sep 14, 2010 3:35 PM

Former Member
0 Kudos

hmm.... sounds interesting. Can you explain your approach in detail please?

Former Member
0 Kudos

What fields do you have for your locations?

Former Member
0 Kudos

I'm not sure where you would be having problems with a hierarchy. The Specified Order doesn't interfere the natural hierarchy of your data as it comes out of the database.

You can use the Specified Order in 2 ways...

1) You simply use it to create a custom sort on your data.

2) You can create custom hierarchy's where none naturally exist. For example, we do business with a number of car dealerships. Unfortunately, there is nothing in the database that tells us where these dealerships are located... So to get around this, I used the Specified Order to create a list of regions and then manually assign the dealerships to the regions.

In this scenario, I still have the ability to group on dealership and maintain all of the subsequent hierarchy's.

HTH,

Jason

Former Member
0 Kudos
2) You can create custom hierarchy's where none naturally exist. For example, we do business with a number of car dealerships. Unfortunately, there is nothing in the database that tells us where these dealerships are located... So to get around this, I used the Specified Order to create a list of regions and then manually assign the dealerships to the regions.

In your case, what field did you select in the Group? And what data did you select in the Specific Order Group?

Former Member
0 Kudos

use your location fields with the location containing [US,Asia, Europe, etc} as your first group and the location with [North US, South Us, etc) as your second group

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Linnda,

I am not sure if my suggested solution would cent percent work but you can try this at your end:

You can try creating your groups dynamically using one formula and parameter logic.

1) Create a parameter as country name to accept country name from user (All your country names i.e US, Europe and Asia) would be hardcoded.

2) Now depending on country name, create dynamic group using if...else logic as a formula.

3) Use this formula as a hierarchy selection criteria using "Hierarchical Group Options" from CR designer.

Regards,

Chinmay Athavale

Former Member
0 Kudos

Hi

Thanks for your input, sounds working but the user dont have to enter/select any Hierarchy node, it will be fixed format but the problem is how can I select a specified Hierarchy node for each of the different Group?

Example, if I didn't put any restriction/filter on the Product ID Heirarchy, then I have the following hierarchy display under one single Group:

World

-->US

-


>South US

-


>Product ID1

-


>Product ID2

-


>Product ID3

-


>North US

-


>Product ID1

-


>Product ID2

-


>Product ID3

-->Europe

-


>South Europe

-


>Product ID1

-


>Product ID2

-


>North Europe

-


>Product ID1

-->Asia

-


>South Asia

-


>Product ID1

-


>Product ID2

But is there a way for me to create 3 separate group from Product ID Hiearachy and select/filter each of the region (US, Europe and Asia) separately and independently so that I can place them into different section in the CR, and can drill-down to the each of the sub-group accordingly? Example:

Group 1:

-->Europe

-


>South Europe

-


>Product ID1

-


>Product ID2

Group 2:

-->Asia

-


>South Asia

-


>Product ID1

-


>Product ID2

Group 3:

-


>North US

-


>Product ID1

-


>Product ID2

-


>Product ID3

Please help.

Former Member
0 Kudos

Linnda,

If you go into the Group Expert and change the group sort order to Specified Order and new tab will appear called, you guessed it, Specified Order.

this will allow you to to manually create groups and to manually assign data columns to your groups. It's very flexible and will allow you to group pretty much anything, any way you want it.

The only side of using it... If you new values be added on a regular basis, it may you to get back into the report and manually update items in the various groups.

Example: For countries and regions, it shouldn't be too bad. They don't come out with new ones on a regular basis... If you were using this for vehicle makes and models, you'd go nuts having to manually go in every time a new car comes out and manually assigning it to a group.

See the Online Help for more information.

HTH,

Jason

Former Member
0 Kudos

Hi,

Was trying to understand more on the Custom Group and glad that you have done it before.

...this will allow you to to manually create groups and to manually assign data columns to your groups. It's very flexible and will allow you to group pretty much anything, any way you want it.

Yes, with Sepcific Order, I can create the Group BUT can not form the Hierarchy. Take a look on my problem:

Hope you can give me some guides.

Thanks!