ReportUsesODBC - cDRReport¶
Methods - Properties - Events
Method Type¶
Function
Return Type¶
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 true when the data source of the report of any of the (nested) sub-reports is ODBC based. Internally, it tests if the result of the function call DatabaseType is C_drODBC.
This method 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.
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
String sReportId sConnectionString sServerFromTable
String sServerFromReportDatabaseConnection
Boolean bUsesODBC
Get OpenReport of oReport to sReportId
Get ReportUsesODBC of oReport sReportId to bUsesODBC
If (bUsesODBC) Begin
Get TableConnectionString Orders.File_Number to sConnectionString
Get ServerFromConnectionString sConnectionString to sServerFromTable
Get psDatabaseConnection of oReport sReportId to sConnectionString
Get ServerFromConnectionString sConnectionString to sServerFromReportDatabaseConnection
Move (Replace (sServerFromReportDatabaseConnection, sConnectionString, sServerFromTable)) to sConnectionString
Set psDatabaseConnection of oReport sReportId to sConnectionString
End
Send OutputReport of oReport
End_Procedure
End_Object