Enabling the User to Filter Data  : Designing the presentation of report parameters : Providing the user with a list of values : Creating a dynamic list of values
 
Creating a dynamic list of values
You can create a dynamic list of values for a list box or a combo box. First, create a data set that retrieves the values with which to populate the list. The query in the following example retrieves all the unique values from the customername field in the Customers table. Specify this simple query in a data set to populate a parameter list with all the customer names.
SELECT DISTINCT customername
FROM Customers
For a report design using dynamic lists, BIRTretrieves values from the data source when the report runs. You cannot predict during the design process how many values the list box or combo box displays when the user runs the report. If you are concerned about the list getting too long, specify a maximum number of values to display. This solution, however, is not practical because the list displays the first value up to the specified maximum number, and omits the rest of the values.
You can display alternate values if you do not want to display the actual field values. You cannot, however, specify an alternate display value for each individual value because you do not know at design time the precise list of values. Instead, you specify an expression that applies to all the values. For example, you can prepend values with static text by using an expression, such as:
"Order " + dataSetRow["Ordernumber"]