I have a report where users are allowed to enter multiple values for a "Device_OIG" parameter.
The "Device_OIG" parameter is setup as follows:
Value type - String
Options:
Allow multiple values
Descrete value(s)
Set Default Values:
Browse table - devicem1
Browse field - BA_ALT_ARRAY
these are a few of the default values from devicem1.BA_ALT_ARRAY...
WIM Oracle DBA
WIM SQL/Server DBA
WIMT Online Channel
And here is part of the record selection:
(If {?Device_OIG} = "" Then
True
Else
{devicem1.BA_ALT_ARRAY} Like {?Device_OIG})
If a user selects the 3 default values listed above, the report only returns records for "WIM Oracle DBA" but not for the other 2 (WIM SQL/Server DBA, WIMT Online Channel). I know that records for the other 2 exist because individual queries for each returns data.
The "Show SQL Query" for the Crystal Report shows:
WHERE ("devicem1"."BA_ALT_ARRAY" LIKE 'WIM Oracle DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM SQL/Server DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIMT Online Channel')
I am not sure how to handle this since data for this field is an array.
I tried using this line of code after the Else:
{devicem1.BA_ALT_ARRAY} like "*" & {?Device_OIG} & "*"
But then a message indicating "This array must be subscripted" is displayed.
Then I tried using:
{devicem1.BA_ALT_ARRAY} like "*" + {?Device_OIG} + "*"
...and selected the 3 default values listed above, the report now returns way too many records...seems to not filter for the 3 selections.
This produced the "Show SQL Query" for the Crystal Report as follows:
WHERE ("devicem1"."BA_ALT_ARRAY" LIKE '%' OR "devicem1"."BA_ALT_ARRAY" LIKE '%' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM Oracle DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM SQL/Server DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIMT Online Channel')
Is there some other code I can use in the record selection that will use a "Like" command for this?
Thanks in advance!!
The "Device_OIG" parameter is setup as follows:
Value type - String
Options:
Allow multiple values
Descrete value(s)
Set Default Values:
Browse table - devicem1
Browse field - BA_ALT_ARRAY
these are a few of the default values from devicem1.BA_ALT_ARRAY...
WIM Oracle DBA
WIM SQL/Server DBA
WIMT Online Channel
And here is part of the record selection:
(If {?Device_OIG} = "" Then
True
Else
{devicem1.BA_ALT_ARRAY} Like {?Device_OIG})
If a user selects the 3 default values listed above, the report only returns records for "WIM Oracle DBA" but not for the other 2 (WIM SQL/Server DBA, WIMT Online Channel). I know that records for the other 2 exist because individual queries for each returns data.
The "Show SQL Query" for the Crystal Report shows:
WHERE ("devicem1"."BA_ALT_ARRAY" LIKE 'WIM Oracle DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM SQL/Server DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIMT Online Channel')
I am not sure how to handle this since data for this field is an array.
I tried using this line of code after the Else:
{devicem1.BA_ALT_ARRAY} like "*" & {?Device_OIG} & "*"
But then a message indicating "This array must be subscripted" is displayed.
Then I tried using:
{devicem1.BA_ALT_ARRAY} like "*" + {?Device_OIG} + "*"
...and selected the 3 default values listed above, the report now returns way too many records...seems to not filter for the 3 selections.
This produced the "Show SQL Query" for the Crystal Report as follows:
WHERE ("devicem1"."BA_ALT_ARRAY" LIKE '%' OR "devicem1"."BA_ALT_ARRAY" LIKE '%' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM Oracle DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIM SQL/Server DBA' OR "devicem1"."BA_ALT_ARRAY" LIKE 'WIMT Online Channel')
Is there some other code I can use in the record selection that will use a "Like" command for this?
Thanks in advance!!