After you create the two parameters for your

After you create the two parameters for your report, you need to add two expressions to the table control in your report. To do this, follow these steps: 1. Click the top-left part of the table to select it. Right-click the table object to display a pop-up menu of options. 2. Select Properties. The Table Properties dialog box appears. 3. Select the Sorting tab and enter the following expression for an ascending sort: =iif(Parameters!Direction.Value= Ascending , Fields(Parameters!SortBy.Value).Value,0) 4. Add the following expression for a descending sort: =iif(Parameters!Direction.Value= Descending , Fields(Parameters!SortBy.Value).Value,0) When you preview the report, you will see two parameters at the top of the report. Enter a value of the column in the Sortby parameter. Simulating the All Parameter Value Situations exist when you want to see on a parameterized report a parameter choice indicating that all values are selected. To do this, when you define the report parameter in the Report Parameter dialog box, define a valid values list of the parameter including the value All. This means that you will see the All value in the list of values for the parameter. In the first case, consider when the parameter in question is a text field like Department. In your dataset expression in the Query Designer, you need to specify in the query the following expression: WHERE department like @department In this case, the All parameter should be mapped to the value of %, which is a wildcard. When the All value is specified, then the like search criteria becomes: WHERE department like % This expression returns rows containing anything in the Department field. Chapter 21: Ten Cool Tricks with Reporting Services 369

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services

Bookmark the permalink.

Comments are closed.