First, let's make sure the SQL Server is all set.
I believe SQL Server Express still has Remote Connections disabled by default, which you can correct by running this:
EXEC sp_configure 'remote access', 0;
GO
RECONFIGURE;
GO
My second thought is that you need to allow the SQL Server service through the Windows Firewall.
After those steps, on the client side, just to test access, create a new ODBC DSN with the "SQL Server" driver (not Native Client), fill in the Name, Server (SQL Server instance probably SERVERNAME\SQLEXPRESS), then click FINISH and Test Data Source. If the test succeeds, the server is completely set. If the test fails, then you may need to check SQL user permissions or make sure the Domain User is present in SQL and set for Trusted Windows Authentication.
Back in Crystal, I would create the report with OLE DB \ Microsoft OLE DB Provider for SQL Server source, that way you won't need to create ODBC DSNs everywhere.
------------------------------
Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
------------------------------
Original Message:
Sent: 09-21-2022 10:24
From: Chris Love
Subject: Using a SQL Linked Server in Crystal Reports
Steve,
My apologies, I liked about one thing. I did not create a DB called tempdb, That is a system DB as you stated. I created a DB called "Test" and my view is under that. It appears my problems is that my ODBC connection pointing to SQL cannot find my Test DB, so I used tempdb by mistake. That's the problem when you start the project one day and then wait a week or more to jump back into the issue. Can't provide the right information.
I actually have all steps #1-4 completed. My follow up problem is that I can find the Test DB in either a new ODBC that looks at the SQL table or I can't find it in Crystal. It's showing me an Acumatica DB I have installed on this machine, but not the one called Test.
So once I've created the Linked Server and the view, do I need to create a new ODBC that uses the SQL Server Native Client 11.0 and use that ODBC in Crystal? Or do I go to Create New Connection and choose Microsoft OLE DB Provider for SQL Server?
------------------------------
Chris Love
Accounting Systems, Inc. (ASI)
------------------------------
Original Message:
Sent: 09-21-2022 08:50
From: Steve Iwanowski
Subject: Using a SQL Linked Server in Crystal Reports
Hi Chris,
There's already a System Database called TempDB, so that part kind of scares me. Can you use a different name (maybe name the database SAGE)?
Assuming this is for Sage Standard or Advanced, here's my typical process:
1) Install Workstation Setup on the SQL Server
2) Create a silent ODBC System DSN on the SQL Server (usually x64) that points to the Sage 100 server/install. Test that it works.
3) Create the Linked Server in SQL to point to that ODBC System DSN. The Provider should be Microsoft OLE DB Provider for ODBC Drivers and you can just use the ODBC Name for the Data source
4) Edit Server Objects \ Linked Servers \ Providers \ MSDASQL and Enable Level zero only
Now you can reference the Sage data by using a more natural query by using the Linked Server name and three dots, like "SELECT * FROM SAGE100...GL_Account". So back in your new SAGE database, you would create the view as "CREATE VIEW vGL_Account as SELECT * FROM SAGE100...GL_Account" and then vGL_Account should appear in Crystal and return everything.
------------------------------
Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯