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

Use foreign key to print name on report

Status
Not open for further replies.

cathiec

Programmer
Oct 21, 2003
139
0
0
IE
Hi there,

I have quite a large report. I have a personnel details table and then I have a management table.
In the management table there is a foregin key called intPersonnelID (this is the name of the persons manager)

I want to be able to print the personnel details on the report and print their manager name as well but the only think that i can use to print the manager name id the forgien key which is the ID of the manager. But when i drag and drop this field onto the report it prints the personnel name again (as expected i suppose) Is there a formula that I can write to grab the manager name from the personnel details table based on the id in the management table.

I am using Crystal 11 Developer Edition

Thanks and Regards
 
Hi,
Join the 2 tables ( personnel details to Managers, using the intPersonnelID) and use the ( I assume one exists) name from the managers table.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
thanks for your reply - i cant do that because all the personnel details are held in the same table (both employees and managers)
 
Hi,
OK, what's in the Management table?

Maybe you can join the Personnel table to itself ( add it twice to the repprt- CR will create an alias for it ) and join between the Employee's ID and the Manager's ID ( or vice-versa, I do not know you data relationships)

Use the aliased table entry for manager info..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top