Applies to
Describes report's data source. In Reportizer interface, these options are available on the Data Source page of the main window. In the text representation of the report, you can see this inside DataOptions block.
It consists of several parts:
1. Interface (see below)
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). It is recommended to use SQL query wherever possible. Example of such a query:
SELECT *
FROM ORDERS
WHERE COUNTRY = 'Germany'
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 of this type 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.
7. Before Open. Optional set of SQL commands which must be executed every time the report data source opens. Only for reports based on database data. It is useful when some preparation must be done in the database before the report data source is opened. This must be any valid set of SQL commands for the report database. In the case of more then one command, the corresponding SQL command separator must be used (e.g. semicolon for most database types). This is how such a set of commands can look, for example, for PostgreSQL database:
--function call to do some preparations:
SELECT * FROM public.prepare_something();
--granting report user privileges on the newly created showcase:
GRANT SELECT ON public.orders_showcase TO showcase_read_role;
This block can be easily disabled/enabled by the corresponding option.
See also