Differences
This shows you the differences between two versions of the page.
— |
how_to_create_a_dsn_file [2019/01/17 09:04] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | This page describes how to create a DSN file, which will allow you to modify reports through Crystal Reports. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Concept ===== | ||
+ | |||
+ | |||
+ | |||
+ | 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... | ||
+ | |||
+ | |||
+ | |||
+ | ===== Cautions ===== | ||
+ | |||
+ | |||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Steps ===== | ||
+ | |||
+ | |||
+ | |||
+ | 1. Our first step is to create a .dsn file. This can be done one of three ways: | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | [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 | ||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | 2. The next step is to use the DSN file to link to your database. | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | |||
+ | 3. You should then be able to add and remove tables and/or fields as needed. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Source ===== | ||
+ | |||
+ | |||
+ | |||
+ | Contributor: | ||
+ | |||
+ | |||
+ | |||
+ | Version: Control 3.1+ | ||
+ | |||
+ | |||
+ | |||