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

Passing array parameters through the SQL Query 1

Status
Not open for further replies.

aaronburro

Programmer
Jan 2, 2003
158
US
is it possible? If so, any help would be appreciated... The array is a discrete array of unknown size of Strings of a max length of 15 characters

CR8.5 for MAS200
MAS200(duh) 4.0 provideX version
 
Crystal will pass parameters through to the database, however not as an array, not sure why you want an array, most databases don't allow for array types as parameters anyway.

If you create a parameter in CR 8.5, and select Allow Multiple Values, then in the Report->Edit Selection Formulas->Record and place {table.field} = {?MyParm}, Crystal will construct the SQL as:

select field1, field2, etc... from table
WHERE (`Order_Details`.`OrderID`=1 OR `Order_Details`.`OrderID`=2)...etc...

The above is an example using the northwind database.

So there's no need for an array.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top