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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can i do a hiearchy in crystal

Status
Not open for further replies.

ss7415

Programmer
Dec 7, 2006
84
US
can i do the report in crystal, instead of doing it in sql?
 
sorry about that, do i need to link the table multiple times to do a hieracy report?
 
Depends on your Crystal version.

Check out Report->Heirarchical Grouping Options.

The aternative might be to add the table a second time with a self join.

-k
 

here is my return of record, wo_nbr is my parent and wo_nbr_1 is the children, i need to look at the data under wo_nbr_1 and below that , until its at the lost level



select a.wo_nbr,a.lot_nbr ,SUBSTR(a.lot_nbr,2) wo_nbr1,a.qty, max (a.date_add)
from wod_table a
--left join wod_table b on SUBSTR(a.lot_nbr,2) = b.wo_nbr
where a.wo_nbr = '479598'
and a. type = '01' and a.lot_nbr like'W%' and a.qty > 0
group by a.wo_nbr,a.lot_nbr ,a.qty--,b.wo_nbr


WO_NBR LOT_NBR WO_NBR_1 QTY MAX(DATE_ADD)

479598 W484620 484620 1 6/13/2006
479598 W484622 484622 1 6/13/2006
479598 W484623 484623 1 7/26/2006
479598 W485868 485868 1 8/9/2006
479598 W486221 486221 1 8/14/2006
479598 W486222 486222 1 8/24/2006
479598 W486877 486877 1 7/5/2006
479598 W490464 490464 1 7/26/2006
479598 W494483 494483 1 9/13/2006
 
how do u do a self join if i need to do one?
 
i liked the table to itself, i have got the second level of data , how do i go to the third and 4th level or etc of the data.
 
if i want to get the 3rd or 4th level below the parent , do i link the table again or can i just do it with it self joining one time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top