For a variety of reasons, database names
and locations get changed. If you create a report, then change the name or
location of a table or file, the
Crystal Reports designer must
be able to find the new name or location. This is especially important when you
create formulas in your report that access a table that has been renamed or
moved. To fix the reference for a single field would not be difficult, but to
find every formula that uses that field could be a difficult and time consuming
task.
To solve this problem, the
Crystal Reports designer uses
aliases to refer to database tables and files. Aliases are pointers, internal
devices that tell the program where it should look for a database field. Now,
if you change the name or location of the database, you simply reset the
pointer. See
Locating files. The name of the alias
does not change, so your formulas are not affected. The
Crystal Reports designer looks
to the alias for the location and name, goes to the new location for the
database field, and executes the formula without a problem.
The
Crystal Reports designer
automatically assigns default alias names to database tables when you first
select the table or file. By default, an alias matches the original name of the
table. In databases where the database table is a separate file (for instance,
dBASE), the name of the database file is used without the file name extension.
For example, if you are using the dBASE database file Company.dbf, the program
will assign a default alias name of Company to the file. You can accept the
default alias or assign a new one to the database table.