To make navigation through the report easier, it is possible to use Bookmark property. This property creates a bookmark that allows you to go to this object from any place of the report with the help of Content tree in Report Viewer. Name of the bookmark should start with # symbol, otherwise Bookmark property value will be ignored.
The following steps help you to create report with data grouping and bookmarks for every group. Steps 1 – 5, 7, 8 are described in detail here. Step 6 describes the creation of bookmarks.
Download the sample application: SampleApplication.zip
Step 1. Create Silverlight application.
Step 2. Set the web application to use the static port “5555”.
Step 3. Add and set up WCF-service.
Step 4. Create Data Source structure.
Open service in the designer. Add DataSet from the Toolbox. Add a table, set table name to “Customers”. Add for columns to the table: Country, City, Company and Phone.
Fill data sources with the values via overriding OnLoadData method of the ReportService class.
Step 5. Create the template.
Add ReportManager. Set the ReportManager property of the ReportService service. Add DataSet to ReportManager’s Data Source collection. Add report slot, run Report Designer.
Create new template with Standard Report Wizard. Set “customers” as DataSource. Add “Country” and “City” fields to Groups fields:
Add Company and Phone to Visible fields. Click “OK” to create the template.
Step 6. Create the bookmarks for report navigation.
The template contains the list of customers grouped by Countries and Cities. In order to assign bookmark to group headers one should set the bookmark property of textboxes belonging to the group header. Binding for grouping by countries follows:
header11_customers_Country.Bookmark = "#" + Group
Cities groups should be nested within appropriate country group. In order to do that one should use the following binding for the nested group’s header.
header12_customers_City.Bookmark = "#" + groupBand1.Group +
"/" + Group
Step 7. Add and set up Silverlight ReportViewer component.
Step 8. Run Application.
Bookmark tree is located on the left. When you select some item in the Content area, report area containing element for which the corresponding bookmark is set will be opened. Also you can use page previews for moving between pages: