Posted on 2005-04-19
Last Modified: 2012-05-05
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.    

Question by:Lmunilla
    LVL 77

    Accepted Solution

    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.

    LVL 100

    Expert Comment

    Agree.  Not sure what the ENFORCED means.  What you want is something like

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

    LVL 19

    Expert Comment

    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




    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now