Practical Application of Action Items


Adventure Works Internet sales department wants to create an interactive product catalog. The initial screen of a report should not be larger than a single page. A report must provide effective navigation through products. A user must be able to navigate through the product category and subcategory hierarchies.

Implementation

A finished implementation is included as a sample for this book, as shown in Actions -- Bookmark.Toggle.Document Map. -- Products.rdl .

First, create a data set (you can name the data set "ProductCategories" as in the sample) with the following query using AdventureWorks data source.

[View full width]
 
[View full width]
SELECT Production.ProductCategory.Name AS CategoryName, Production.ProductSubcategory.Name AS SubCategoryName, Production.Product.Name AS ProductName, Production.ProductPhoto.ThumbNailPhoto, Production.Product.ProductNumber FROM Production.ProductCategory INNER JOIN Production.ProductSubcategory ON Production.ProductCategory.ProductCategoryID = Production .ProductSubcategory.ProductCategoryID INNER JOIN Production.Product ON Production.ProductSubcategory.ProductSubcategoryID = Production.Product.ProductSubcategoryID INNER JOIN Production.ProductProductPhoto ON Production.Product.ProductID =Production .ProductProductPhoto.ProductID INNER JOIN Production.ProductPhoto ON Production.ProductProductPhoto.ProductPhotoID = Production .ProductPhoto.ProductPhotoID

Create a report layout outline, as shown in Figure 14.2. This report uses Matrix to provide category navigation.

Figure 14.2. Navigation Report Layout view.

Right-click Matrix's column group and view the Properties dialog box. On the Navigation tab (see Figure 14.3), add the following expression to the BookmarkLink ( Jump to bookmark) action:

 =Fields!CategoryName.Value 

Figure 14.3. Jump to bookmark.


This allows users to access an appropriate category name on a report. Apply formatting so a user can tell that this is a clickable item.

Right-click the text box and view the Properties dialog box. On the Navigation tab, enter the following expression to the Jump to URL action (see Figure 14.4):

 mailto:support@adventureworks.com 

Figure 14.4. Jump to URL navigation.


This action starts the user's email application and places support@adventureworks.com in the To... line.

Edit the table Subcategory group (inner group) and enter the following expression in the Document Map Label:

 =Fields!SubCategoryName.Value 

and the following expression in the Parent Group:

 =Fields!CategoryName.Value 

Note that this is a grouping expression and a document map for the outer (parent) group (see Figure 14.5). Thus, a hierarchy is formed for a document map.

Figure 14.5. Document map and its hierarchy.


Click the Visibility tab. Set Initial Visibility to Hidden. Check the Visibility Can Be Toggled By Another Report Item check box, and enter CategoryName. Visibility information should look similar to Figure 14.6.

Figure 14.6. Setting item visibility.


In addition, set the Visibility/Hidden property to true for all detail cells and set the Visibility Can Be Toggled By Another Report Item to SubCategoryName for detail cells in the Product Name and Photo columns .

Edit the parent group to enter =Fields!CategoryName.Value as a grouping expression and a document map.

Access the properties of an image and add navigation to the Actions -- Hyperlink -- Product Detail report by filling the Jump to report action. Additional formatting and retrieving a picture of a product from the database should be easy. See Figure 14.7 for the final product.

Figure 14.7. Sample report with navigation.

An actual sample produces slightly different output and has some remarks pointing to the implemented futures .

Note

Note how the Actions -- Hyperlink -- Product Detail report make use of the HideCost parameter. This is a hidden parameter that prevents the casual user fromviewing cost information. However, when this report is accessed from Actions -- Drillthrough.PlusInteractiveSort -- Sales Order , a Drillthrough action on this report sets the HideCost parameter to False and thus reveals cost information.




Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net