Right-click the cell on the Detail row in

Right-click the cell on the Detail row in Level column and select the Expression menu item. Then in the Edit Expression dialog box, type the following expression: =Level( RecursiveGroup ) This Level function returns the current level of depth in a recursive hierarchy. The highest level is 0. 5. Indent the first column based on level. Right-click the first column cell and select Properties menu item to display the Textbox Properties dialog box. Click the Format tab. In the Left spacing textbox, enter the expression: =2 + (Level ( RecursiveGroup ) * 20) & pt This will left indent by a multiple of 20 points for each level of the employee. 6. Bold the Highest Level Employee. This will add to the readability of the report. In the Textbox Properties dialog box, click the Font tab. Then for the Weight specification, enter the expression: =iif (Level ( RecursiveGroup ) = 0, Bold , Normal ) Then click OK. 7. Add the Employee Count field. Enter the following expression for this cell in the report: =Count(Fields!EmployeeKey.Value, RecursiveGroup ,Recursive) 8. Hide lower levels and toggle the visibility of the lower levels. To do this, right-click the detail row and select Edit Group in the list that appears. In the Details Grouping dialog box that appears, click the Visibility tab. Under initial visibility, click expression and enter the following expression: =iif(Level() = 0, False, True) Then check the Visibility Can Be Toggled By Another Report item check box and select Employee as the toggle field. 9. Preview the report. Your final report should look something like the one shown in Figure 15-5. Dynamically visible data regions Another way to utilize the visibility options in Reporting Services is to have a textbox toggle the visibility of an entire data region. You can do this by using SubReports within a report while having the textbox be the toggle to showing or hiding the information. Follow these steps: Chapter 15: More About Interactive Reporting 279

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

Bookmark the permalink.

Comments are closed.