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!

Can I have 2 fields of the same name in the same section?

Status
Not open for further replies.

ericb1

Programmer
Oct 22, 2004
175
US
Not sure how to set this up: CR10, I have 3 tables: SystemUsers, Network_Printers, Attached_Printers

All 3 are linked by field: Name

When I put field {Attached_Printers.Name} on the details, they show up fine, but when I try to add {Network_Printers.Name} in the same details section, it just goes blank.

So I don't know how to set this up. Basically we have 2 tables showing users' attached printers, and another for their network printers. I've tried putting them in different detail sections, or using formulas to show them, but nothing seems to work. I think it's a linking problem, but I'm not sure how to correct. Any help is greatly appreciated, thanks!
 
I'm guessing that the names don't actually match. The name shows up when you place one name in the details because the other table is not yet activated (no fields are yet used). I would try each field in the detail section, print out the results and then compare. You may need to use a different field for linking, or to link based on a formula that makes the name comparable between tables.

-LB
 
To clarify, to link based on a formula would involve using a subreport.

-LB
 
Do System_Users ALWAYS have both (Network & Attached)?
If not, the link should be a left outer join.

-LS
 
Good point. Eric, you should explain your current links exactly--from what table to what table.

-LB
 
Ok, this was actually a sub-report, and I've broken it down into 2 different sub reports. Individually, they work fine. But when I try to link them on the main report, they don't work.

Linking {systemMainTable.MachineName} to {NetworkPrinters.MachineName} and {systemMainTable.MachineName} to {AttachedPrinters.MachineName}. Each subreport is in it's own detail section of the container report.

It was too confusing the other way, b/c even with a left outter join on the main table and the printer tables, there's no real way to know when someone is going to have a)just an attached printer b)just a network printer, or c)a network and an attached printer.

Thanks
 
Are you saying that even if you have only one subreport in the main report that the subreport doesn't work? Or are you saying that a subreport stops displaying in the main report when the second subreport is added?

-LB
 
Yes, either one or both subreports stop displaying in the main report when added. It doesn't matter which of the 2. But I know they work outside of the main report.

Also, these aren't the only subreports in the main report. I have another subreport, very similiar to the other subreports, and it's linked to the main report in exactly the same way.
 
As I suggested earlier, I think you have to verify that the machine names in each subreport and the main report are exactly the same.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top