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!

To display a field not on the table

Status
Not open for further replies.

Jeremy1216

Technical User
Feb 7, 2007
6
CA
I am using CR10 on a MSSQL 2000 server. Sorry I am only a casual CR user and I have the following question on creating a report. I have a report to extract staff information with the manager's first and last name. However, we only record the manager's ID on the form. How could I query the table and return the first and last name if the staff ID and present them on the report? Thanks!
 
Strange, howcould you return a nameifyou only store the ID?

I'll guess that the desciption is just off, and that what you want is to pass an ID and limit rows to only that or those IDs:

Create a parameter of the appropriate type (we need to know data types), and you can select multiple values if yuou want to enter more than one, then in the Report->Selection Formula->Record place:

{table.field}= {?MyParameter}

-k
 
If you only have the ID in a table, then you would have to hard code this by creating a formula like this:

select {table.ID}
case 123 : "John Doe"
case 456 : "Jane Jones"
case 789 : "Ed Norton"

Place the formula in the detail section or group on it, depending upon your needs.

-LB
 
Sorry guys as I didn't make it clear on my first post and thanks for the quick reply ;-)
It's a report to extract staff info with their first, last name, manager first and last name. Each entry carries the mgr's ID which is the same as the entry ID (login name).
F.N. L.N. MgrFN MgrLN
with the mgr ID, how could I extract them to the two mgr field.
 
Still not clear. What are the fields you are working with? I guess there is an employee ID and a manager ID and then one first name and one last name field? If so, add the table a second time, and link the employee ID field to the manager ID so that the name field in table_1 will show the manager's name.

-LB
 
Less description and more technical information would be better.

Show and example of what you have in the database, and an example of what you need.

-k
 
I think I understand your dilemma. i am working on a report and want to show the Admitting MDs name. The database file that contains this info only has the MD ID in the field. I have linked the staff file to the report in an attempt to display the name and not the ID. Unfortunately, I can't figure out how to make that happen. I tried creating a formula like: {CLINICAL.ADMITTING_MD_ID}={STAFF.NAME} but this did not work. Any help will be appreciated.
 
If table1 has the ID and other info and name and table2 has the ID and name, you need to link the ID fields to each other and then display the name field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top