TableNumber - 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. |
sTableName |
Name of table, case insensitive |
Description¶
Returns the number of the table in the report that matches the passed tablename. The table names are compared in a case insensitive way. If the report contains no tables or no table is found with a matching name, the function will return -1.
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 'Show table names'
Procedure OnClick
Integer iTable
String sReportId
Variant vData[][]
Get OpenReport of oReport to sReportId
If (sReportID <> '') Begin
Get TableNumber of oReport sReportId "Customer" to iTable
// fill an RDS array
Send TableData sReportId iTable vData[][]
Send CloseReport Of oReport sReportId
End
End_Procedure
End_Object