Working on a Pattern Matches search work around since WEBI doesnt provide at the report level. Please keep that in mind no report query or Universe solutions please. Just on report vertical block view.
Bottom line: I need to filter the report whether alpha-numeric or numeric is input.
I created a variable called it Search Term. The variable logic is = (just to hold an input value)
I created a variable called it Search Matches. The variable logic is =If Pos([State Num];[Search Term]) > 0 Then “Yes” Else “No”
I projected both of these variables into an existing vertical table creating two new columns.
I created an Input control called State Num Search (Contains) based on Search Term variable as a text input box field.
Vert table ex
State Num |
many more columns | Search Term | Search Matches |
B2136G44
C2136G44
B2136F23
When you enter a search value in the Input Control text entry box and press OK, the value is populated on every row in the Search Term column. The Search Matches column evaluates the Search Term row value against the State Num column row value and returns a simple Yes/No logical for each row. Then filtering the report on the Search Matches column to display only YES produces the final filter. Both added search columns in the vertical report are then hidden.
The problem: The State Num column is a Char dimension from the Universe. When I enter B2136 in the Input Control text entry box as an alpha numeric, the search filter returns the correct records. When I enter 2136, the Search Term column shows the entered value as 2,136 numeric and the search fails comparing a numeric value to a char field and Search Matches column returns #ERROR and all records are displayed with no filtering. The Search Term variable automatically changes data type on the fly based on the entered value causing the error. Ive tried several different methods to force the Search Term when numeric to text with FormatNumber, but no luck as it returns an error… probably something simple. Also tried IF/Then with isError logic to trap and process the error and isNumber to determine data type and process accordingly with no luck. In the end, the solution needs to tie back or merge to a single column that can be filtered. Any reference to a column that is in error - return the same error. Sounds simple…but got two black eyes from it. LOL! I see why BOE never included it. Maybe another solution?
Working in Rich Client 14.0.7 Build 1147.
datawizard (BOB member since 2015-01-20)