Navigation:  Advantage Crystal Reports > Using the Advantage Crystal Reports Driver > Configuring Crystal Reports at Runtime >

Configuring Crystal Reports at Runtime

Crystal Reports

Previous pageReturn to chapter overviewNext page

The most common way of connecting a Crystal Report to Advantage is through the use of aliases (See Defining a Database Alias for use with Crystal Reports for more information). However, that method requires that at least some Advantage configuration settings be placed in the ads.ini file which then needs to be distributed with the report. This page describes a method in which the ads.ini file is not required and all the Advantage configuration settings are set at runtime when the report is run.

Ads.ini File Aliases and Runtime Options

When a report is designed in the Crystal Reports IDE, it is designed using an alias. The alias name is stored in the report and is used at runtime to gather configuration options from the ads.ini file. The only configuration option required to run the report is the connection path. This means that the connection path must either be set in the ads.ini file with the report’s alias, or it must be specified at runtime via the DatabaseName report property. If the ads.ini file isn’t found, or the alias isn’t found in the ads.ini file, the default statement options will be used. Options set at runtime will override options found in the ads.ini file.

Advantage Runtime Report Options

The following options are allowed to be set in at runtime via the DatabaseName report property:

Option Description

Option Name

Supported Values

Connection Path


(Any connection path)

Connection Handle


(String form of an Advantage Connection Handle)

Default Table Type


FoxPro, Clipper, Advantage (default is Advantage)

Compatibility Locking Mode


On, Off (default is On)

Character Set


Ansi, Oem (default is Ansi)

Collation Language


(Any string Collation) ansi:en_US, oem:cs_CZ, etc.

Rights Checking Mode


On, Off (default is On)



(Any username)



(Any password)

Max number of closed cursors to cache


(Any number, default is 25)

Show Deleted Rows


True, False (default is False)

Default Table Extension


Any file extension (default is ".adt")

Server Types


1 for local, 2 for remote, 4 for internet (default is 6, remote or internet)

Communication Compression


A, N, or I (Always, Never, Internet)

Delphi Example

This example does not require an alias to be in the ads.ini file. All options not set via the DatabaseName property are set to their defaults.


procedure CrystalTest();


 Crpe1 : TCRpe;



   Crpe1 := TCRpe.Create( NIL );


   Crpe1.ReportName := 'C:\test_report.rpt';

   Crpe1.Connect.DatabaseName := 'DataDirectory=C:\data;RightsChecking=Off;';