Is an "Enforced Both Inner Join" type supported by the SOTAMAS90 ODBC DSN?

I seem to recall a Sage KB that indicated there were only 3 Join Types supported by Sage (MAS, back in the day). Inner Join, Left Outer and something else. I don't recall hearing about the "Enforced" setting. I ask because we have a client who are very sharp and have created many new report and report settings. In this case they are linking in standard table into the work table using this join (which I have never before seen):

I can tell you that this report in its current state takes over 40 minutes to run and I think it is not running quick enough for Task Scheduler to send it to Microsoft's Print to PDF printer. Does that make sense?

TIA

Parents
  • Hi Cullen, I've never used any of the enforcement options other than "not enforced"

    From SAP Help

    Using the various join enforcement options can ensure that linked tables are included in the SQL query, even when none of the fields in the table are used in the report.

    How long does the report without the additional table take to run?   Without seeing the RPT,  I'd follow the advice of BL and Kevin add a UDF if the data needed from BM_BillHeader is just a couple columns or try changing the enforcement to "not enforced" validate the results and compare performance.

    Thanks John

Reply
  • Hi Cullen, I've never used any of the enforcement options other than "not enforced"

    From SAP Help

    Using the various join enforcement options can ensure that linked tables are included in the SQL query, even when none of the fields in the table are used in the report.

    How long does the report without the additional table take to run?   Without seeing the RPT,  I'd follow the advice of BL and Kevin add a UDF if the data needed from BM_BillHeader is just a couple columns or try changing the enforcement to "not enforced" validate the results and compare performance.

    Thanks John

Children
  • in reply to jcnichols

    Thanks John,

    I found similar info on a different site. However I still don't really understand it: "Enforced Both: When you select this option, if either the "from" table or the "to" table for this link is used, the link is enforced."

    I may get a chance to run more tests on the report, and if so I will try your suggestion.

    Follow up question: is it possible there is a timeout feature in Task Scheduler, Deferred Printing and/or Microsoft Print to PDF that is coming into play here?

    Thanks again,
    Cullen

  • in reply to rclowe

    You can't print to PDF in a scheduled task because of the file name prompt.

  • in reply to rclowe

    From my understanding of the join enforcement, if you have two tables without the join enforced and your report doesn't contain fields from table 2, then the report will not enforce the join to table 2 so you effectively only have table one being read.  Having it set to Both means even if you don't reference any fields from table 2, then the join is still used so it will expect a match between both tables depending on the join type (inner, left, etc).  I believe you should be able to put this to the test by viewing the SQL statement that crystal reports generates by playing with the different enforcement options and including/excluding fields from table 2 in-between refreshing the report. 

  • in reply to David Speck

    Here are some examples.

    With the following tables in a report.

    If the join is not enforced as seen below.

    Then if I only add the ItemCode field from CI_Item into the report and view the SQL query, I get the following.

    Now if I change the enforcement of the join to Both while still only having the ItemCode field from CI_Item in the report, the SQL query looks like this.