Data Source

Applies to

Data Source

Describes report's data source. Consists of several parts:

1. Interface

2. Database. Depends on interface:

ADO: Physical directory (folder) (for example, with DBF files), multi-table database file (for example, .mdb, .accdb, .xls, .xlsx, .html etc), ODBC data source (DSN) or ADO connection string.

FD: List of connection properties, which varies depending on database type (Oracle, SQL Server etc).

Interbase: Interbase or Firebird database file (they usually have .gdb, .ib, .fdb extensions).

BDE: Physical directory (folder) (for example, with DBF files), multi-table database file (for example, .gdb), name of the BDE alias or ODBC data source (DSN).

Folders/Files: Physical directory (folder) name. Can be specified by relative path, for example "..\Examples". May include predefined constants <CURRENT_DIR> and <TEMPLATE_DIR>, which are replaced with current directory name and directory of the report template, respectively.

3. User name. For databases, which require user authorization; if not specified, the user will be prompted to enter it when connecting the database. Only for data sources where interface is ADO, FD, Interbase, or BDE.

4. Password. For databases, which require user authorization; if not specified, the user will be prompted to enter it when connecting the database. Only for data sources where interface is ADO, FD, Interbase, or BDE.

5. Query parameters. Describes properties of every query parameter (if data set is a query and SQL text contains parameters), which makes entering parameter values for end user more useful. Only for data sources where interface is ADO, FD, Interbase, or BDE.

6. Data set. Depends on interface:

ADO, FD, Interbase, BDE: A table name from the database or SQL statement (SQL query).

Folders/Files: XML-based description of the dataset, as it is shown in the following example:

<Dataset>
 <Source>FILES_AND_FOLDERS</Source>
 <Options>
  <FileMask>*.*</FileMask>
  <IncludeReadOnly>0</IncludeReadOnly>
  <IncludeHidden>0</IncludeHidden>
  <IncludeSystem>0</IncludeSystem>
  <IncludeSubFolders>0</IncludeSubFolders>
 </Options>
</Dataset>

<Source> specifies, which items of the database should be selected. Possible values: FOLDERS, FILES, or FILES_AND_FOLDERS.

<FileMask> specifies file filtering mask. Multiple masks must be separated by semicolon.

<IncludeReadOnly> specifies either to include read-only files. Possible values: 1 (i.e. include) or 0 (i.e. not include).

<IncludeHidden> specifies either to include hidden files. Possible values: 1 (i.e. include) or 0 (i.e. not include).

<IncludeSystem> specifies either to include system files. Possible values: 1 (i.e. include) or 0 (i.e. not include).

<IncludeSubFolders> specifies either to include items from subfolders. Possible values: 1 (i.e. include) or 0 (i.e. not include).

The dataset always has the following fields:

FullPath   Full path of file (folder).
ItemCreated   File (folder) creation date.
ItemLastAccessed   File (folder) last accessed date.
ItemLastModified   File (folder) last modified date.
ItemName   File (folder) name.
ItemSize   File (folder) size in bytes. For folders, 0 is returned.
ItemType   Type (extension) in upper case (without period).
FileFolderMark   Contains 0 for folders and 1 for files.

See also:

Specifying data source for report

Query examples