I've been around Crystal for a long long time. And I've seen my quirks. But this is a new one for me and perhaps the strangest. And, to tell you the truth, it's very bothersome because it effects the integrity of the data result set.
Anywho.....
CRXI R2/Oracle
Varchar field in DB (FIELDA)
Data resembles
we'll call this TABLE1.FIELDA)
ABC-DEF-123
ABC-DEFQ-123
ABC-DEFQ-456
etc
Basic report, simple select expert
{V_PCR_PERSON_ROLE.ACR_ROL_CODE} in PARAM1 to PARAM2
Run report, enter A for PARAM1 and Z for PARAM2 -- OK, correct data returned
Run report again enter ABC-DEF-123 for both PARAM1 and PARAM2 - OK, correct data returned
Run report again enter ABC-DEFQ-456 for both PARAM1 and PARAM2 - OK, correct data returned
Run report again enter ABC-DEFQ-123 for PARAM1 and ABC-DEFQ-456m for PARAM2 - NO DATA RETURNED.
View SQL, copy paste into SQL+ -- data returned, correct result set SQL is >= param1val and <= param2val
So, go to the select expert and REPLACE the "-"'s with nothing -- like this...
results are OK -- correct data returned.
So, I've defined at least 1 possible work around...but WTF is the problem? Has anyone ever seen this behavior before?
How did you resolve it?
-- Jason
"It's Just Ones and Zeros
Anywho.....
CRXI R2/Oracle
Varchar field in DB (FIELDA)
Data resembles
ABC-DEF-123
ABC-DEFQ-123
ABC-DEFQ-456
etc
Basic report, simple select expert
{V_PCR_PERSON_ROLE.ACR_ROL_CODE} in PARAM1 to PARAM2
Run report, enter A for PARAM1 and Z for PARAM2 -- OK, correct data returned
Run report again enter ABC-DEF-123 for both PARAM1 and PARAM2 - OK, correct data returned
Run report again enter ABC-DEFQ-456 for both PARAM1 and PARAM2 - OK, correct data returned
Run report again enter ABC-DEFQ-123 for PARAM1 and ABC-DEFQ-456m for PARAM2 - NO DATA RETURNED.
View SQL, copy paste into SQL+ -- data returned, correct result set SQL is >= param1val and <= param2val
So, go to the select expert and REPLACE the "-"'s with nothing -- like this...
Code:
replace({TABLE1.FIELDA},'-','') >= replace({?PARAM1},'-','') and
replace({TABLE1.FIELDA},'-','') <= replace({?PARAM2},'-','')
results are OK -- correct data returned.
So, I've defined at least 1 possible work around...but WTF is the problem? Has anyone ever seen this behavior before?
How did you resolve it?
-- Jason
"It's Just Ones and Zeros