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!

Find and print a value from the same table, different record

Status
Not open for further replies.

NavyFederalDetta

Technical User
Mar 22, 2006
16
I need to print the name of a model where the parent id = the model id.

the submodels are on the same table as the models.
lparentid modelname modelid
62345 abc 62345
62345 xyz 67543
67588 test 67588
62345 sample 68726

i want to return "abc" on records "xyz" and "sample" since they both have the same parent id as "abc"'s model id.

it's some sort of "find in table". I'm on Crystal Reports 2008, v 12.3

Thank you!
 
You can go to the Database Expert and add that table again. It will append "_1" to the end of the name to distinguish it from the original.
 
Do the 3 fields all come from the same table? If not, please provide table names of where the 3 fields (or post the SQL generated by the report if that is easier).

How do you know that ABC is the name associated with the Parent ID, and not XYZ.

I suspect this is going to require just a simple change of table links.


Pete
 
Add the table again as Charliiy suggested, and link the Model ID on the first table to the parent ID of the new table. Then place the model name from the new table on the report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top