Multiple connections to SOTAMAS90 in Crystal Report

SOLVED

This is occurring in Crystal Reports XI R2 with Sage 100 ERP 4.5. Client has created a custom report pulling data from AR_InvoiceHistoryHeader, AR_Salesperson, and AR_Customer. Link to AR_Customer from AR_InvoiceHistoryHeader is a left outer join connecting BillToDivisionNO and BillToCustomerNO to ARDivisionNo and ARCustomerNo.

When client ran the report, he was prompted twice to log into the database. Checking the Database Expert, he saw that there were two connections under Current Connection to SOTAMAS90. In the Selected Tables window, AR_Customer was under its own SOTAMAS90, while the other tables were under a separate SOTAMAS90. 

The report runs in under 5 seconds, and returns the correct data. However, client is perturbed that he had to log into database twice to run the report, since he will run the same report for 6 different company codes.

Added the report to Custom Reports menu via Report Manager, and report took almost 3 minutes to run. Client deems this unacceptable since the report ran in 5 seconds outside the Sage menu.

We used the Set Database Location utility to select the correct SOTAMAS90 db to use in the report. Viewing the dsns, we noticed each had a different set of properties:

No matter which SOTAMAS90 we set as the default to use, the result was the same: the report took over 3 minutes to run. I've tried correcting this several ways, always with the same result. 

Has anyone else experienced this type of issue and come up with a solution?

Parents
  • 0

    I'd use the Set Datasource Location screen to update the DSN used by the bottom two tables to be the same as the top.  You generally don't want user / path settings in the report.

  • 0 in reply to Kevin M
    verified answer

    Does the report have a sub-report?  Also if he is going to run the report outside of MAS it is best to use a "silent DSN"

  • 0 in reply to BigLouie
    verified answer

    Hey Big Louie!

    No sub-report in the report. We have tried a silent DSN, but get the same result if we use the DSN as the only connection. However, defining one connection using the silent DSN does allow us to run the report with only one login prompt, and the report runs in 5 seconds.

    Thanks for the advice. I'd still like to know why the second connection is being created. I've narrowed it down: the second connection is created after I  link the AR_InvoiceHIstoryHeader table to the AR_Customer table using the AR_IHH BillToDivision and BillToCustomer as a left outer join to the AR_Customer ARDivision and Customer fields. Anyone have any ideas?

  • 0 in reply to JellyRolls

    I would like to see a screen shot of the links tab. Normally you see this when you have tables that are not linked.  Is AR_Customer linked to anything? I am guessing no.

Reply Children