DatabaseMainType - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
One of the database type constants
Arguments¶
| Argument | Description |
|---|---|
sReportId |
ID of the report. Can be ID of the main report or the ID of a sub-report. This argument can be passed as an empty string. The empty string can be written as C_USEMAINDRREPORTID. |
Description¶
Returns whether the used data-source is based on DataFlex, ODBC, Runtime Data Source, or SQLite based data.
A report must be opened before this function can be called; otherwise, an error is generated.
This method cannot be used before the report OCX object is initialized. The COM object creation is done as part of the OpenReport method if not done beforehand.
DataFlex Framework usage¶
- Web
- Windows
- FlexTron
Sample¶
Object oReport is a cDRReport
Set psReportName to 'MyReport.dr'
End_Object
Object oRunReportButton is a Button
Set Label to 'Show filelist or catalog'
Procedure OnClick
Integer eDatabaseType
String sReportId sFileListName sCatalog
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
Get DatabaseMainType of oReport sReportId to eDatabaseType
If (eDatabaseType = C_drDF) Begin
Get psDatabaseName of oReport to sFileListName
End
If (eDataBaseType = C_drODBC) Begin
Get psDatabaseName of oReport to sCatalog
End
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object