This tutorial demonstrates how to enable sorting report data in Print Preview and provide the drill-down functionality that allows collapsing and expanding specific document sections.
Do the following to enable sorting report data in Print Preview:
Switch to the Properties panel and expand the Behavior category. In the Interactive Sorting section, set the Target Band property to the detail report's Detail band.
Set the table cell's Field Name property to the ProductName field.
Click the Preview toolbar button to see the result. When a mouse pointer hovers over the Product caption, it changes to a hand, indicating the sorting capability. The arrow at the element's right edge indicates the sorting order.
This section describes how to add a drill-down functionality to your report, hide the detail data in a document and access this data by clicking a link in the document.
Drop the Label control from the Toolbox onto the master report's Detail band to create a link for toggling the detail report's visibility state.
Double-click the added label and type Show/Hide Details.
Switch to the Properties panel, expand the Appearance category and apply the required formatting (for example, the blue color and underlined text) for this label to resemble link.
Select the Detail Report band, and in the Properties panel, expand the drop-down list for the Drill-Down Control property.
The list displays all report controls available on the report band that is one level above the current band in the hierarchy. Select a previously added label from the drop-down list. Clicking this label expands and collapses the detail report in Print Preview.
You can also use the Drill-Down Expanded property, which is enabled by default, to specify whether the band is initially expanded.
Switch to Print Preview to see the resulting document.