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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter number value to text in Select Expert

Status
Not open for further replies.

rptg

Technical User
Aug 24, 2009
5
US
Parameter number value needs to be converted to text within Select Expert:

(if {?Read_Route} = '*' then {CSS_UTIL_ENVRNMT.READ_ROUTE} = {CSS_UTIL_ENVRNMT.READ_ROUTE}
else {CSS_UTIL_ENVRNMT.READ_ROUTE} = {?Read_Route})

Above returns error message that “A string is required here”
 
Please better explain what you are trying to do. Are you trying to select all records if {?read_Route} = '*'?

I cant follow your logic if that is the formula you have in the select expert

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Yes, I am trying to select all records if {?Read_Route} = '*', but this needs to be converted to text within Select Expert.

The parameter prompt text reads “Enter Read_Route Number(s) or '*' for ALL:” due to the number of values for this field.

 
I think you should just change the prompt text to:

"Enter Read_Route Number(s) or '0' (no quotes) for all numbers:"

Then change your formula to:

(
(
{?Read_Route} <> 0 and
{CSS_UTIL_ENVRNMT.READ_ROUTE} = {?Read_Route}
) or
{?Read_Route} = 0
)

-LB
 
LB - That would work except zero is actually a value for that field so zero cannot be used.
 
Then use a value that does not exist, e.g., 9999.

-LB
 
The values actually go up to 9999. I could use 10000, but was hoping to make asterisk work in Select Expert if possible.
 
Why? It won't work with a number parameter. You could use 100000 as a value field, and then use "*" as the description field, and display only the description for the picklist, but then you'd have to add all possible numbers to the picklist as well, and it will only accept 1000 values.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top