Variable Grouping

Cory Fifield -

Trouble viewing images? Click on images to enlarge.

Important - This guide was done using the Northwinds sample database.




1. On the Parameters tab, click Add Parameter.



2. Set the Datatype, Description, Name and Type for the new parameter. Set the Type property to Combobox. (Note: String should be used most of the time for Datatype.)



3. Click on the Values List and enter the values that will be used for the variable grouping (EmployeeID, OrderDate, City) then click OK.



4. Open Finished Reports and Right Click on the Details field list and select Add Calculated Field.



5. Right Click on the New Expression and select Edit Expression.



6. Enter the code for your expression. For every additional variable in the expression, you will use Iif( , ,)

The format for creating the different variables is indicated below:


 Iif( [parameter] = 'one' , field_one , Iif( [parameter] = 'two' , field_two , 'else' ))




7. Under Group and Sort click Add a Group and group using the new expression.



8. Save the Finished Report, then go back to the VDM main screen and add a filter for OrderDate is Less than or equal to 10/31/1996. (This will return less data making it easier to see the results)


9. Search the View and enter the parameters, then go to Finished Reports


Variable Grouping Preview (EmployeeID)




Variable Grouping Preview (OrderDate)




Variable Grouping Preview (City)


Have more questions? Submit a request


  • Avatar
    Nathanial Wcislak

    I think this may need an update, there is no longer an option to right click parameters on the finished reports designer.