Set up SQL Data connections for Sage Crystal Reports
Overview
Sage 300 CRE uses Crystal Reports to generate formatted reports. To connect Crystal Reports, and thus the Sage report designs to your data which ADC has extracted into SQL Server, you will need to:
- Create a 32-bit ODBC connection called a System DSN on each computer that will be accessing the reports.
- Make a one-time adjustment to each report file in the Crystal Reports Designer to connect it to the ODBC connection.
This document provides the step-by-step instructions for performing these configurations and adjustments.
Create ODBC System DSN
To create the required ODBC connection you will need to follow these steps:
- From your start menu (Windows icon) type ODBC
- Choose ODBC Data Sources (32 bit)
- Select the System DSN tab and click the Add... button
- Choose SQL Server as shown and click Finish
- In Name enter a name such as SageERP which should be the same on any other computers which will access the same reports, Description can be anything you like (e.g. 'Sage 300 CRE'), finally in the Server section select or type in the name of the SQL Server instance
- It is recommended that Windows authentication is used in most cases (when you have centrally managed logins), if all users in the organization will share a single account to read data then SQL Server authentication can be selected (and you will need to enter the credentials below and make sure they are saved so you are not prompted when running reports).
- Using SQL Server authentication will require that the password for the SQL account be stored in the data connection itself, or alternatively the users will need to manually fill in the password each time a report is run. Storing the password in the data connection is considerably less secure as this connection is stored as plain text.
- Using Windows authentication requires that the Windows user has at minimum a Read Only connection to the SQL Server database. This can be accomplished through either directly giving users access to a database in SQL Server Security Logins, or can be done by creating an Active Directory security group and assigning the permissions in SQL Server Security to the Active Group.
- For more information on setting up SQL Server authentication, please consult Microsoft documentation: https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-login?view=sql-server-ver16#SSMSProcedure
- Change the default database to your anterraDataCenter database (often this is ADCData)
- Don't change any settings on this screen:
- Click the Test Data Source button and confirm that success is shown
Adjusting Sage 300 CRE Crystal Reports
This section provides step-by-step instructions on how to open and modify a Sage 300 CRE standard report to use the data ADC extracted into SQL Server in order to speed up the production of the report.
It is our recommendation that you make a backup copy of any RPT file prior to modifying it. You can do this by clicking File and then selecting the Save As... option. This will open the Save As prompt allowing you to select where to save the copy of your report. Once you select where you want it to be saved you can enter the name of the report to be saved and then click the Save Button.
- From your start menu (Windows icon) type Crystal Reports and select SAP Crystal Reports XXXX for Sage
- Open the File menu and open the report you want to modify to use SQL Server.
*If the report you want to load is not on the list, please click the Open... selection from the dropdown and find your saved file to load from your PC.
- Click on the Database menu and select Set Datasource Location
- Only the first time you're editing a report:
- Select Create New Connection > ODBC > Make New Connection
- Select new DSN in Data Source Selection.
- Checked Trusted Connection (unless you used SQL Server authentication in step 6 during ODBC setup)
- Date fields in the report do not automatically map across from Pervasive to SQL Server and must be mapped manually. If the 'Map Fields' dialog box comes up after making the change to the data source location, uncheck the 'Match Type' dialog box, and manually select the same field names as the field in the Unmapped Fields section, and then click the Map button. Each unmapped field will need to have this step performed for both the main report, and subreport tables if they exist.
- If you have multiple data folders in ADC these steps are also required:
Verify all tables used in the report are shown under Selected Tables then click on the Links tab
ADC adds a column called DBID which contains the name of each ADC Connection / data folder. If you have multiple Sage Data folders set up in ADC, It is strongly recommended that the DBID field be added to all other linked tables that have the DBID field. This allows your report to work across data folders and allows you to add the DBID column to the report so you can see the company the data originated from.
To link tables which already have a relationship drag and drop DBID from the parent table (Source) and drop it on the child (Target) to link it. Validate that the DBID field appears in blue and a return arrow appears on your mouse cursor.
Click the OK button to save.
- Test Report in Crystal Reports Designer.
Add New Report to Sage
If you modified the stock report then accessing the report through Sage will work as it originally did and the menu item will already be present, however if you created a copy with a new name or a new report, the following instructions will walk you through adding the report to Sage:
- Open the New Report dialog in Sage as your normally would, then select Crystal report design ( Important: do NOT check the 'Use SQL' check box as this is a specialized option that only works with the Sage data replicator).
- Select the report you created in the earlier step
- Test the new report by selecting it in the Sage menu.
Related Articles
Troubleshooting Problems Data Sync to AnterraBI
Some of the common reasons for the anterraDataCenter sync to stop running are as follows: The local or active directory account that is used by Windows Task Scheduler to run the data update has had its password changed. Your ERP system (Sage, ...
'Timberline Version Changed' appears when anterraDataCenter opens
Background When anterraDataCenter opens, a dialog box with the title "Timberline Version Changed" appears Each time anterraDataCenter opens, a message appears that has the following text in it: "Timberline version has recently been updated. SQL ...
Invoice Sync: Setup Sage 300 CRE with ADC
Once you have Invoice Sync installed, use the following steps to complete setup. Configuring Sage 300 CRE with ADC Clicking the Config menu (shown below) then choosing Setup ADC Sage 300 CRE will bring up the Config ADC Sage 300 CRE window. In the ...
Resolving Pervasive.SQL 3006 error found in AnterraDataCenter Log files
The Pervasive.SQL.3006 error is a result of a timeout between the Pervasive Client and Server which creates a broken or interrupted connection. This can happen if AnterraDataCenter is on a different server from the Sage Pervasive database, or if the ...
Data Trimming Security Report
To help clients better understand what end-users see, Anterra has implemented user security audit reports. Reach this area of Anterra’s site by going to Admin, then User Admin, then User Data Trimming Report. This is a Pivot grid allowing clients to ...