This page describes how to create a DSN file, which will allow you to modify reports through Crystal Reports.

In order to create a custom report or modify a standard report in Crystal Reports, you will need to establish a link between your report and your Control database. This link is called an ODBC (Open Database Connection) link. It allows you to communicate with your database so you can pull tables and fields directly out of your database onto your report. The ODBC is stored in a .dsn file that gets created everytime you preview a report in Control. If you open your .dsn file in Notepad, you'll see that all of the necessary information needed to connect to your database is there - server name, database name, user name, password, etc…

As with any report changes, be sure to make a backup of your report before making changes to it. The only other caution would be to make sure you are using the correct version of Crystal Reports. If your reports are designed to work in SMS, you'll need to use Crystal Reports version 8.5 to modify reports. If your reports will be used in Control, you'll need to use Crystal Reports version XI to modify reports. Note that these versions are not backwords compatible.

1. Our first step is to create a .dsn file. This can be done one of three ways:

<div style="margin-left: 20px;"> A. Use the .dsn file that Control creates everytime you open a report in Control </div>

<div style="margin-left: 40px;"> 1. Open Control and open and report in Control. </div>

<div style="margin-left: 40px;"> 2. Keep Control open and open your My Computer icon. </div>

<div style="margin-left: 40px;"> 3. In the address bar, type "%temp%" (no quotes). This will open up the local Temp folder. </div>

<div style="margin-left: 40px;"> 4. You should see a folder called "Control....". Inside of that folder, you should find a file called "DNSFile....DSN". </div>

<div style="margin-left: 40px;"> 5. Copy that file to a location that your computer with Crystal Reports installed on it can access. Feel free to rename the file. </div>

<div style="margin-left: 20px;"> B. Use the GenericDSN.DSN file that implementation can give you </div>

<div style="margin-left: 40px;"> 1. Copy the file to a location that your computer with Crystal Reports installed on it can access. </div>

<div style="margin-left: 40px;"> 2. Right click on the file. Click Edit. </div>

<div style="margin-left: 40px;"> 3. Enter your server name where it asks you. </div>

<div style="margin-left: 40px;"> 4. Save the changes. </div>

<div style="margin-left: 20px;"> C. To manually create a DSN file: </div>

<div style="margin-left: 40px;"> 1. Open NotePad </div>

<div style="margin-left: 40px;"> 2. Copy the contents of the DSN file below </div>

<div style="margin-left: 40px;"> 3. Update the following fields: </div>

<div style="margin-left: 40px;">> a. Check the SQL database name for DATABASE (usually StoreData by default). </div>

<div style="margin-left: 40px;">> b. Update your UserName in WSID. </div>

<div style="margin-left: 40px;">> c. Update the SQL Server and Instance name for SERVER. </div>

<div style="margin-left: 40px;"> 4. Save the file with the .DSN extention. (We recommend using Control.DSN or something to identify it.) </div>

<div style="margin-left: 40px;"> </code> </div>

[ODBC]

DRIVER=SQL Server

UID=cyrious

Trusted_Connection=No

DATABASE=StoreData

WSID=CRYSTAL19-UserName

APP=Cyrious Control - Ver. 04.50.1108.1202 ODBC

SERVER=CRYSTAL19\SQL2008R2

</code>

2. The next step is to use the DSN file to link to your database.

<div style="margin-left: 20px;"> A. Open your report in Crystal Reports. </div>

<div style="margin-left: 20px;"> B. Click Database > Set Database Location </div>

<div style="margin-left: 20px;"> C. On the ODBC (RDO) screen, select Find File DSN and navigate to your DSN. Click Next. </div>

<div style="margin-left: 20px;"> D. Your username is cyrious and your password is __Contact Cyrious Tech Support for Password__ and ask for the password to the cyrious user in SQL for Control. </div>

3. You should then be able to add and remove tables and/or fields as needed.

Contributor: Cyrious Software

Version: Control 3.1+