PDA

View Full Version : Somehow I managed to create twice a relation?



Boris
2-Jun-2010, 11:18 AM
I have a table (ICPROD), related with ICMARCA and ICGRUPO as shown in the image (vrw4.png). When I try to run the report I get an error (vrw5.png) saying that I specified the link to ICMARCA more than once.

When I click on the Show SQL Query, I get this:



SELECT "ICPROD"."CODIGOMARCA", "ICPROD"."PRODNUMERO", "ICPROD"."PRODNOMBRE", "ICPROD"."CIA", "ICMARCA"."NOMBREMARCA" FROM ("dbo"."ICPROD" "ICPROD" LEFT OUTER JOIN "dbo"."ICMARCA" "ICMARCA" ON "ICPROD"."CIA" = "ICMARCA"."CIA") INNER JOIN "dbo"."ICMARCA" "ICMARCA" ON "ICPROD"."CODIGOMARCA" = "ICMARCA"."CODIGOMARCA" WHERE "ICPROD"."CIA"='40' ORDER BY "ICPROD"."CODIGOMARCA"

Boris
2-Jun-2010, 11:40 AM
Ok, I think I found the problem.

I needed this join to be a LEFT OUTER JOIN. As you can see the relation is with two fields.

In Crystal, when you set a join type on one field vía Link Options, when you go to a different field, that previously selected type of join is shown. in VRW not.

Vincent Oorsprong
2-Jun-2010, 01:34 PM
Boris,

There is a known a logged problem with a relationship on two fields in an SQL database environment.