Data Source

Applies to

Report

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

1. Data source type

2. Database. Depends on data source type:

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. Connection string must begin with <ConStr>.

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).

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

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 data source type is ADO, BDE, or Interbase.

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 data source type is ADO, BDE, or Interbase.

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 data source type is ADO, BDE, or Interbase.

6. Data set. Depends on data source type:

ADO, BDE, Interbase: 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