Filter Directories

TECH TIP:  RB Server –  Filtering Report Volume Directory information

The RB Server custom parameters demo shows how to provide client applications with customized views of the reports available on the server. A login page is presented to the client that enables the user to specify custom session parameters.

In the server application, the TrsReportVolume.OnGetDirectory event is used to modify the Directory tree structure that is passed back to the session. This event provides access to the client’s session parameters and to a copy of the Directory tree.

Another approach is to use the TrsReportVolume.BeforeBuildDirectory event to filter the data used to build the directory. When using this approach, you will want to set ReportVolume.DirectoryOptions.EnableCaching to False. The TrsReportVolume.BeforeBuildDirectory event provides access to the client’s session parameters. The event-handler code will execute within the context of the datamodule instance, therefore you have complete access to all components on the datamodule. Thus, you can use the client’s session parameters to perform a custom database login or apply a filter to a dataset, etc.