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!

dynamic sql

Status
Not open for further replies.

ililal

Programmer
Dec 4, 2006
15
US
Can crystal do a dynamic sql.

For instance, i have a multi parameter as id.

i want crystal to append this to the existing where clause.
Exactly, with out "
thanks

"(id is null or id in(1,2,3)"

where 1,2,3 are the id passed in.

Thank you
 
You need to post your software version, and what "passed in" means.

Are you calling CR from an application?

Not sure why you are trying to specify how the criteria is passed to the database, Crystal handles this for you if you simply set a multiple parameter in the record selection formula, as in:

(
isnull({table.id})
or
{tableid} in [1,2,3]
)

This assumes that ID is a numeric, otherwise wrap each value in double quotes, but again, please post specifics.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top