- Getting Started
- Administration Guide
- User Guide
- Developer Guide
Hide Pages at Run Time
In Wyn Enterprise, you can easily hide or remove the pages in a Page report at the run time using the Visibility properties.
The visibility for a report page can be set using the Hidden and ToggleItem properties. These properties let you specify whether to hide or display the page when you preview a report.
In the rendered report, the page generation for the hidden pages is skipped.
Using the Hidden Property
This property controls the visibility of the report page based on the expression that you specify or the value you set, that is, True or False. If you want to hide the report page, set the property to True. In case you want to conditionally hide the report page, enter a suitable expression.
Consider a scenario where a Page report contains three pages: Page 1, Page 2, and Page 3. Page 1 of the report consists of the report header and order summary details. Page 2 of the report contains the overflowing content of Page 1, that is, order summary details, and Page 3 consists of receipt of the ordered items. You want the page generation for Page 3 to skip in case the order amount or the amount paid is zero. For this, set the Hidden property for the Page 3 to {iif(Sum(Quantity * UnitPrice) = 0, true, false)}.
Have a look at the below image. The rendered report shows the summary details, order details, and receipt details for Customer IDs 1 and 2. However, the receipt details for Customer IDs 3 and 4 are hidden since they paid no amount for the ordered items.
Using the ToggleItem Property
This property toggles the visibility of the report page based on a textbox click in the report. In the rendered report, a toggle icon appears next to the textbox (the toggle item) to indicate a collapsed state for the hidden page and an expanded state for the visible page. Whenever the textbox is clicked, the toggle state changes, and accordingly, you can show or hide the page.
You can also set the initial visibility state of the report page using the Hidden property.