psDatabaseName - cDRReport¶
Methods - Properties - Events
Type¶
String
Default¶
None
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¶
If the data source is DataFlex (DatabaseMainType = C_drDF) and the filelist was used to select tables, this property holds the name and path of the filelist.cfg file. If individual tables were used, this property holds the name of the first table in the report.
If the data source is ODBC (DatabaseMainType = C_drODBC, C_drSP, or C_drSQL), this holds the name of the datasource; it is the value entered when creating a new connection.
If the data source is RDS (Runtime Datasource, DatabaseMainType = C_drRDS), this holds the static name "Runtime Datasource".
This property cannot be used before the report OCX object is initialized. The COM object creation is - when not done before - created as part of the OpenReport method.
Related topics¶
- [psTableCatalog](./pstable-catalog.md
- [psTableName](./pstable-name.md
- [psTableSchema](./pstable-schema.md
- [psDatabaseConnection](../both/psdatabase-connection.md
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 'Run Report'
Procedure OnClick
Integer eDatabaseType
String sReportId sDatabaseName
Send RunReport of oReport
Get psReportId of oReport to sReportId
Get psDatabaseName of oReport sReportId to sDatabaseName
Get DatabaseMainType of oReport sReportId to eDatabaseType
If (eDatabaseType = C_drDF) Begin
Send Info_Box ('filelist = ' + sDatabaseName)
End
If (eDatabaseType = C_drODBC) Begin
Send Info_Box ('datasource = ' + sDatabaseName)
End
If (eDatabaseType = C_drRDS) Begin
Send Info_Box ('database = ' + sDatabaseName)
End
End_Procedure
End_Object