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!

Parent child hierachy

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
US
I am using two fields named PARENT and the other named WONUM in a table named WORKORDER. The PARENT field contains a workorder number that is the parent to a child work order number in the WONUM field. The WONUM field is associated with several other fields such as labor and materials that I am displaying in my report. The issue is that the PARENT field isn't associated with those same details. My report is currently grouped by parent with its respective children underneath. The problem is that I cannot display any data for the PARENT workorder because it has no assocation with the same information that WONUM has. So, how do I go about associating that PARENT work order number with the same information that is assocatied with the WONUM work order number. Report example:

Work# Labor Materials
Group (Parent) 12543 ? ?
Details(children)21233 $533 $87
23242 $334 $76
34353 $112 $32

Group (Parent) (null)
Details(children)12543 $452 $542


In different group, the same PARENT workorder number is shown with labor and materials as a child of a null field because it is as its native WONUM field. So, as you can see, I need to be able to associate, replace, etc the relationships from WONUM to the PARENT field. Any help would be GREATLY appreciated.
 
Add the Work_Order table a second time to your report.

Crystal will force you to open it under a different "Alias". You can rename the alias (use F2) to "Parent_WO" or something meaningful.

Then, simply join to the "new" table based on "Parent"
in the Work_Order table being equal to the "WONUM" in the "Parent_WO" alias.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ido,
I appreciate your help. Your idea worked. Thank you!
-Krusher
 
The join between the original table and its alias must be a left outer join, as apposed to an equal join.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top