cancel
Showing results for 
Search instead for 
Did you mean: 

Link many fields to one table

Former Member
0 Kudos

Hello,

Using CR v14.

How do I link multiple fields to the same table?

table A:

field 1 links to table B

field 2 links to table B

field 3 links to table B

My attempt with the 'link tab' under the 'Database Expert' allows me to set the links but the report only shows records where field 1,2,3 are all the same.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Eric,

Check the Link options -> inner join

If you get the duplicate data right click on the field -> format field-> common tab-> check suppress duplicates.

possible, link multiple fields to the same table but table not having primary key thats why data comes duplicates.

Reference link: Create a one to many relationship using SQL Server - Stack Overflow

Regards,

DJ

0 Kudos

Hi Eric,

Moved your post to the Report Design forum.

What you are doing is correct but not enough info on how the tables relate to each other. When dragging field to field in the Linking Wizard the default is a Left Outer Join so you will get multiple rows with the same numbers.

If the linking is correct try this:

Check on the Suppress if Duplicate and see if that's what you need. But I suspect you need Links or a Command Object to get the data you really want.

Need more info and details about the tables you are trying to link.

Don

Former Member
0 Kudos

Suppress if Duplicate does not work.

Table A is an order table

Table B is a company table

Table A has multiple fields that have company IDs

so I have many IDs in Table A that need to get the company name from Table B

Does that help?

Former Member
0 Kudos

Hi Eric,

Table B has the primary key i.e company IDs.

Can you please check the mappings and relationships. And also get the company name from Table B .i.e Table B.company ID = Table A.company ID.

If you donot mind can you share any screenshots or command or query.

Thanks,

DJ