Skip to end of metadata
Go to start of metadata


Multi-Value Parameters to SQL Commands

SQL Command Objects are very useful as they allow a report designer to enter a custom SQL statement to use as the data query for the report.  Any part of the SQL statement can be parameterized using Command Object Parameters.  New to Crystal Reports 2008 is the ability to pass a multi-value parameter to SQL Commands.  For example, I have created a SQL command with the following text: SELECT * FROM Customers WHERE country in {?Countries List}

I have also created "Countries List" as a Command Object Parameter and set the "Allow multiple values" checkbox.  Now when I run the report I will be prompted to enter in one more many countries.  These countries are then formatted and placed into the placeholder area {?Countries List} of the SQL Command.

 By using this feature to call a stored procedure from within your SQL command, you can also pass multi value parameters to stored procedures as well.

 Henry, Crystal Reports Product Manager

  • No labels