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

Design hierarchical Tree type Report

Status
Not open for further replies.

vxxv

Programmer
Jan 23, 2004
32
PT
Hello,

I have a good problem to solve.
My db (oracle) has a table of equipments(eq) in it. In that table i have two specific fields called 'eq_id' and 'subcomponent_of'. The 'eq_id' field is the primary key of the table, where lays the equipments codes, and in the 'subcomponent_of' field is where i put the code for that subcomponent (meaning that this is still a equipment code). So, i can see the equipments and there subcomponents, it's a relation father to son. There for i have a hierarchical tree of equipments and their subcomponents.
My problem is that, how can i pass that relation to Crystal Reports. Internally, the sql of Crystal needs to make a loop to run all the records, giving me all the levels the tree has.
So if anyone can help me with this issue i'll be very grateful.

Jaime Teixeira

 
Under the Report menu,
select the "Hierarchical Grouping Options..." entry... :eek:)

By the way, since you are running Oracle, keep in mind that Oracle can do the same thing in SQL...

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for the tip.
I going to try it.

Best regards,
JT
 
I´ve tried it and it worked well, but what i want is to restrict the report only to one family of my choice.
Meaning that i'll insert an equipment code and it will show me the family of that equipment.

By the way, in Oracle, how would i construct such information and how to treat it in Crystal Reports.

JT
 
How is a "family" defined in the data?

To do this in Oracle, read about the "START WITH" and "CONNECT BY" clauses.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I there again.
I've been very busy with other stuff.
I´ve encountered a problem with the solution you gave me.
As I said earlier, the equipment codes are all ok but I want to restrict it to only one code.
I want to be able to introduce an equipment code and then Crystal Report will show me the family tree, it's subcomponents for that equipment, only that equipment, not all the equipments relations.
That's what I meant for a "Family".

Best regards,
Jaime
 
do a research on BOM SQL oracle in Google and you'll find code for this kind of problem
(I don't know oracle SQL sorry)

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Is it possible to do this is Crystal Report?
I've tried to put a parameter to restrict the result only to one code, but then the hierarchical function does not work well.
I don't know if it's possible to do this or if I'm doing something wrong.

Jaime
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top