This walkthrough expands upon the report created in the Master Detail Reports walkthrough. If you have not created the Master Detail report (CustomerOrders.rdlx) already, please do so before continuing.
This walkthrough illustrates how to create a drilldown report using the Hidden and ToggleItem properties.
The walkthrough is split up into the following activities:
- Opening the Master Detail Report
- Hiding table rows and setting a toggle item
- Viewing the report
Note: This walkthrough uses the Customer table from the Reels database. By default, in ActiveReports, the Reels.mdb file is located in the [User Documents folder]\GrapeCity Samples\ActiveReports 10\Data folder.
When you complete this walkthrough you get a layout that looks similar to the following at runtime.
Design Time Layout
Runtime Layout
To open the report in Visual Studio
- Open the Master Detail Report project in Visual Studio.
- In the Visual Studio Solution Explorer, double-click CustomerOrders.rdlx.
To hide table rows and set a toggle item
- In the designer, click inside the table to display the column and row handles along the top and left sides of the table.
- Select the second group header row containing the static labels (Title, Quantity, Price and Total) by clicking the row handle to the left of it.
- Hold the CTRL key and select the Detail row containing field expressions to add to the selection.
- In the Properties window, expand the Visibility property and set its properties as follows.
Property Name |
Property Value |
Visibility Hidden |
True |
Visibility Toggle Item |
TextBox10 (the textbox containing the expression =First(Fields!LastName.Value)) |
To view the report
- Click the to view the report at design time.
- Click the Preview tab of the report designer.
- Click the + icon next to a customer to display order details for that customer.
- Click the - icon to hide the details.
OR