INTERNET APPLICATION DEVELOPMENT
MID MARKET ERP DEVELOPMENT
by Sheila Zhang
We know that Sage 300 ERP is smart enough to use the local SQL database login to replace the SQL database login that is used on the development computer. So you don’t always need to install your client database when developing a general logic report for them on your computer. We did this for a while. However, you need to do this if you are referring to an additional data table or view created by yourself.
Unfortunately, last week, when I implemented a Crystal Report-related program on a client’s computer, I received an error about the SQL database login. The client is using Sage 300 ERP 6.0 and the user “accpac” was a valid SQL user and assigned in Sage 300 Database Setup configurations.
However, the program and report worked perfectly on my testing server. So what happened? The interesting thing is I received another invoice form from the same person at the same time. When I ran the form, I got the same error.
Both reports have a special situation different from the original Sage 300 ERP reports. They all link an additional data table or view in the Sage 300 ERP database.
Then I tried to use the same environment as the client:
Everything is the same but the report still got the error. The only difference is I didn’t have their company database and they don’t have the sample company database I used to develop the Crystal report.
And then I started to test the database:
After adding a dummy database and tables in the report with the same name as the client, the order confirmation printed without the issue.
My best guess is when Sage 300 printed the report, it first accesses the database stored in Crystal Report to validate the tables, views, and formulas instead of the database in Sage 300 Database Setup. After Crystal Reports validates the basics of the report, the Sage 300 ERP repost object replaces the login with the one assigned in Sage 300 Database Setup to grab the data. This replacement only happens to the Sage 300 ERP database tables. The additional data table or view still uses the original login in Crystal Report.
Sage solved this issue in Sage 300 EP 2012. If you still work with Sage 6.0, to solve this issue, the best way is to install your client database, or at least create a dummy database with the same database name as your client.
Here is another way to fix the issue. You need to add a registry key on each computer:
1. Go to[HKEY_LOCAL_MACHINE\(or \Wow6432Node\)SOFTWARE\ACCPAC International, Inc.\ACCPAC\repcmd]
2. Add a new key "alwayssetlocation" and set the value to "Yes"
It works, however it is risky.