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

Can groupname be maipulated to show fields from a particular record?

Status
Not open for further replies.

roody91

Technical User
Jan 16, 2002
21
0
0
US
I am doing an org. chart from a Lotus Notes personnel database. Each employee has a record w/ name, ssn, address , supervisor name, manager name, etc. I am grouping by manager name then supervisor to show the organization. Instead of just the manger or supervisor name appearing as groupname, I would like to see information about that Manager/Supervisor in the group header ie address & phone number. Is it possible to write a group name formula that will search out a record where the name is = the supervisor name being grouped on and extracting fields from that record to show in the group header field. I've been banging my head trying to get this to work but so far all I'm coming up with is a headache!
 
I would suggest using a sub-report for this. Put the subreport with the information you want into the header with the supervisor's name. Link the {Sup.Name} in the main report to the {name.field} in the sub-report. Mike

 
You don't have to display the Group name in the group header if you don't wish to. You have already informed Cx to group on Supervisor and it will still do this if you delete the group name from the group header section.
So, create a formula with the details you need ie.
Supervisor + " " + Address + " " + Whatever.
Call it Supervisor-description and add this field to the Group header section instead of Supervisor.
 
Subreport is indeed one option, but a simpler approach is to add the Employee table a second time (use Database, Add Database to Report) and give it an alias of Supervisor.
Join to the the employee table based on the supervisor code in the Employee table being equal to the employee code in the "Supervisor" table.

Do the whole thing again but now for the manager.

Make sure the joins to the supervisor and manager
"tables" are outer joins (since higher-level employees have no supervisors or managers).

Now you have direct access to all the info about the supervisor and manager for each employee.

Cheers,
- Ido ixm7@psu.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top