FindFilterId - 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. |
sFilterField |
The table and column reference to be located. The value must be surrounded by curly braces. The search is case insensitive. |
eFilterOperator |
Represents one of the filter operator constants. This parameter is optional if sFilterValue is not required. |
sFilterValue |
The filter value to compare against. This can be omitted if you're only identifying a filter by its field and operator. The comparison is case-sensitive. |
Description¶
Returns the N-th filter defined in the report based on the passed arguments.
Returns -1 when no filter match has been found.
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.
Related topics¶
- AddFilter
- FilterCount
- peFilterOperator
- psFilterFunction
- psFilterField
- psFilterValue
- RemoveAllFilters
- RemoveFilter
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 sSelectedState
Integer iFilter
Get OpenReport of oReport to sReportId
If (sReportId <> '') Begin
// Finds a filter for the table customer, column state and equal as operator
Get FindFilterId of oReport sReportId "{Customer.State} C_drEqual to iFilter
If (iFilter <> -1) Begin
Get Value of oStateComboForm to sSelectedState
Set psFilterValue of oReport sReportId iFilter to sSelectedState
End
Send DisplayReport of oReport
Send CloseReport of oReport sReportId
End
End_Procedure
End_Object