Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping problem

Status
Not open for further replies.

rwj

Programmer
Jun 5, 2001
16
GB
I have a recordset that returns the following

OrderID Classification Class_level Amount
1 Company 1 $100
1 Department 2 $100
1 SalesPerson 3 $100
2....
2....
2...

I need to create a report that groups by SalesPerson, within Department,within Company

Still using Crystal 7 so no, I don't have access to the hierarchical grouping function

Any help appreciated
 
Actually, the hierarchy option is not what you need.

In this case, you simply need to create three group levels: Company -> Dept -> SalesPerson.

Cheers,
- Ido ixm7@psu.edu
 
Methinks I oversimplified this example

THe data is hierachical, and might go more than three levels, or less than three levels . Using Oracle CONNECT_BY_PRIOR to return the recordset and am trying to avoid building a temp table.

Creating a group on Classification is not going to help, all that will do is change the order
 
Could you provide more clarification of the problem?
Is the issue the need to provide the summary info for the lowest-level but not knowing in advance how many levels you have?

If the number of potential levels is finite, you could build headers/footers for all levels and suppress them for levels that don't have "peers." You could do that by using a combination of a) the NEXT() function and b) a variable to check that the group column one level above is the same in either the next group or the previous one.

Cheers,
- Ido
ixm7@psu.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top