Skip to content

psTableCatalog - 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.
iTable The index of the table in the report. Table numbers start at 0.

Description

Sets/Gets the table catalog name of the table identified by the iTable parameter.

Do not attempt to replace a table with another table that has a completely different structure or column names (e.g., replace a table named customer with a table named orders).

When a table number is passed that is higher than the number of tables in the report or when it is negative, an error will be generated.

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.

The property can only be used on a MSSQL data-source.

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

        Get OpenReport of oReport to sReportId

        // Set the table catalog name of the second table to 'HistoryOrders2021'
        Set psTableCatalog of oReport sReportId 1 to 'HistoryOrders2021'
        Send OutputReport of oReport
    End_Procedure
End_Object