Using command objects as list-of-values data sources
Crystal Reports supports command objects as data sources for unmanaged lists of values. To use this feature, you first create a command object using the Database Expert to return the values that you want in your list-of-values object.
For more information see "Defining an SQL Command" in the online help.
For more information see Defining an SQL Command.
The query you create should return at least one database field per level in the new list-of-values object. For example, if you want to build a Country, Region, City list-of-values object, your query should return at least three columns from your database: Country, Region, and City. You need to return all three values in a single select statement. There is no need for an order by clause, because the prompting engine sorts the values according to your specifications.
All the command objects defined in your report appear in the value fields drop-down list, and in the description fields drop-down list in the Create New Parameter dialog box. You can then associate your list of values with the command object.