• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1042
  • Last Modified:

EXPLAIN "ENFORCED TO", "ENFORCED FROM", "ENFORCED BOTH" JOIN CONDITIONS

I am joining 2 tables via a Left outer join.  I want all the records in the primary table to be included and only those records inthe secondary where my joined field is equal, to be included.  THe link is created, but I am getting way too many records.  

When I view the link options, I see Crystal placed the default  of "NOT ENFORCED".  I do not know what this means exactly.  The options are "NOT ENFORCED".  "ENFORCED TO", "ENFORCED FROM", "ENFORCED BOTH" .

Which of these options should I click to get the results I list in the first paragraph
EXAMPLE if My primary table was the Customers table and the secondary table was the orders tbl:

Customer Table     Customer Table       Orders Table  

Customer ID          Customer Name       Order Amount  
52                        Allez Distribution      25141.50
53                        BG Mountain Inc.      19164.30
53                        BG Mountain Inc.      1683.60
57                        Hansen MTB Inc.      15716.40
54                        Bicicletas Aztecas      
55                        Deely MTB Inc.    
 

 
0
Laura Munilla
Asked:
Laura Munilla
1 Solution
 
peter57rCommented:
Hi Lmunilla,

You can leave the selection of 'Not Enforced' if you are choosing fields from both tables in your report.
You need to look carefully at the Link Tables dialog and make sure that CR is using Left and Right for the tables selected in
the same way that you are expecting.  I find that the link is often established from the 'many' to the 'one' rather than from the 'one' to the 'many' and I have to use the 'reverse link' option to get the relationship the right way round for me.
 

Pete
0
 
mlmccCommented:
Agree.  Not sure what the ENFORCED means.  What you want is something like

FROM
CustomerTable LEFT OUTER JOIN OrdersTable
ON
CustomerTable.CustomerID = OrdersTable.CustomerID

mlmcc
0
 
GJParkerCommented:
Youi also need to bear in mind that even if you create the LEFT OUTER JOIN in the linking expert, if you then add a condition on the orders table then this will nullify the LOJ i.e.

tbl2.OrderAmount > 1000

HTH

Gary

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now