Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter in record selection

Status
Not open for further replies.

zenmind

MIS
May 9, 2010
10
0
0
US
Crystal XI, Oracle.
I'm seeing a different result with these 2 selection statements.

{%Division} = {?Division}
{%Division} in {?Division}

The first one gives me all Athletics division records when 'Athletics' is entered as the parameter. But the second one gives me all Athletics records plus those with a blank Division. I want the first result but the second may also be useful in other circumstances. Is this a bug or an intended difference?
 
I can't recreate this issue. What is the content of your SQL expression {%Division}? How is the parameter set up? Did you set up a default value?

-LB
 
Check your data. The result would make sense if {?Division} had a lot of leading spaces.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
The SQL expression is trim(nvl("Table.Division",' ')). I tried this as a {@Division} formula also with the same result. No default value for the parameter, only one value allowed.
No leading spaces in the parameter.

I see that brackets give me the correct result {%Division} in [{?Division}] so this seems to be a syntax error that for produces a result although incorrect. I won't pursue it further. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top