Skip to Content
avatar image
Former Member

Crystal Server Join querying one row at a time

I have join between two tables . and there is a left join between the

vehicles left outer join members. on vehicles.mbr_id=members.mbr_id

in SAP Crystal report it is mentioned as an outer join

The behavior I am seeing is that Crystal Report is sending select query for each member_id from vehicles table and sending a query on members table where filter for each ID.

So instead of joining the two tables.. It is sending query for each and every member one by one and returning the result and combining them. Which is taking ages .

Why is it not joining in one query?? Any ideas

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 18, 2017 at 01:35 PM

    Connect to your Database and in the Connection Wizard select the Link Tab.

    Right click on the line between the 2 tables and select Options, you can now change the link type to LOJ.

    Also, are both tables in the same DB and using the same connection?

    What DB are you using and which Client are you using? Some older Clients are not capable of a left OJ or only one.

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • Looks like query is running as you/crystal have defined it.

      In cases of joining external databases I have found it better to use a Command rather than let Crystal build query from database tables wizard.

      You can write much more efficient SQL yourself.

      Ian

  • Sep 18, 2017 at 02:50 PM

    Also, if you have a subreport, then the subreport query will run individually for each time it appears on the report instead of once for the report and then being filtered by the subreport link.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded