Report keeps referring to wrong field (1 Viewer)

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
I have a query[view] where I have six employee numbers, I left join these to an Employee table to retreive the names.

I've created a report that uses this query/view as its source. For some reason my report keeps making all six name fields refer to the same control source Employee.Name and not Employee_1.Name, Employee_2.Name, Employee_3.Name,.... respectively.

In design view everything looks fine but when I switch to report view the switch happens, it displays the same name in all fields. When I switch back to design view all of the fields have changed to the same control source.

Any idea why this is happening?? My tables are in a SQL server, don't know if that has to do with anything.
 

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
I went back a renamed all of my fields, that seems to have worked. thanks
 

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
AHHHH

I thought I fixed it but i'm getting the same problem.

I renamed my fields to

Quality_name.EmployeeName
manager_name.EmployeeName
Operation_name.EmployeeName
...
...
...

however in the report everything changes to Quality_name.EmployeeName once I save. Any idea?
 

David R

I know a few things...
Local time
Today, 15:00
Joined
Oct 23, 2001
Messages
2,633
I don't exactly understand your question. Does the report's query contain all three fields?

Can you post a screenshot of where you're setting something to manager_name.EmployeeName ?
 

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
the picture attached shows the setup of the report, all six text boxes are referring to a different field, quality, manager, and operation...

Once I save and open in report mode they all switch to Quality_name.EmployeeName
 

Attachments

  • screen1.jpg
    screen1.jpg
    79 KB · Views: 90

David R

I know a few things...
Local time
Today, 15:00
Joined
Oct 23, 2001
Messages
2,633
the picture attached shows the setup of the report, all six text boxes are referring to a different field, quality, manager, and operation...

Once I save and open in report mode they all switch to Quality_name.EmployeeName
Can you post the SQL of the query behind Report_CAR_Root_D1_Signatures_subreport? I feel like there's something catastrophically wrong with your table design... do you ACTUALLY have separate tables for QA Managers, Project Managers, and Operations Directors??
 

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
SELECT View_Report_CAR_Root.CAR_ID, View_Report_CAR_Root.quality_name.EmployeeName, View_Report_CAR_Root.quality_sign.EmployeeName, View_Report_CAR_Root.manager_name.EmployeeName, View_Report_CAR_Root.manager_sign.EmployeeName, View_Report_CAR_Root.operation_name.EmployeeName, View_Report_CAR_Root.operation_sign.EmployeeName
FROM View_Report_CAR_Root;
 

GT_engineer

Registered User.
Local time
Today, 16:00
Joined
Aug 23, 2012
Messages
85
EmployeeName isn't a reserved word so naming it EmployeeName or Employee_1_Name isn't going to make a difference.
 

David R

I know a few things...
Local time
Today, 15:00
Joined
Oct 23, 2001
Messages
2,633
I'm not talking about that part. I'm talking about (and spike was before me) the two periods you've got in your table/field reference there in your SQL. One is good, because it separates View_Report_CAR_Root (your table) from manager_name.EmployeeName (your field, presumably). But the field name shouldn't have a dot in the middle of it... change that one to an underscore or just remove it entirely (ManagerName).
 

Users who are viewing this thread

Top Bottom