| ActiveReports 8 > ActiveReports User Guide > How To > Section Report How To > Conditionally Show or Hide Details |
In a section layout, you can use conditions in the Format event to control the display of report's detail section at runtime.
These steps assume that you have already added a Section Report (code-based) template in a Visual Studio project and connected it to a data source. See Adding an ActiveReport to a Project and Bind Reports to a Data Source for further information.
![]() |
Note: These steps use the Products table from the NWind database. By default, in ActiveReports, the NWind.mdb file is located in the [User Documents folder]\ComponentOne Samples\ActiveReports 8\Data\NWind.mdb. |
| Field Name | Properties |
|---|---|
| ProductName | Location: 0, 0.104 in Size: 2.667, 0.2 in |
| Discontinued | Location: 2.667, 0.104 in Size: 2.021, 0.2 in |
| ReorderLevel | Location: 4.688, 0.104 in Size: 1.812, 0.2 in |
To write the code in Visual Basic.NET
To write the code in C#