Overview

The Viewer Tag Library allows you to access the Crystal report viewers through modular and reusable tags. Using tags allows you to reduce the amount of embedded Java code in a JSP page by moving the functional implementation into the tag and its implementing class. Doing so effectively abstracts the details of the code from the presentation of the actual page, allowing the web page author to concentrate on developing JSP pages. This allows all the functionality of the Crystal report viewers to be accessed without knowing how to write Java code.

The Viewer Tag Library is made up of a primary tag, the viewer tag, and a collection of nested tags. The viewer tag supports attributes that relate to the way the Crystal report viewers appear and behave.

Using the Viewer Tag Library is equivalent to using the Viewer Java SDK to programmatically customize the viewer. It provides the same basic functionality that the Viewer Java SDK provides, supporting the same features and allowing the same level of customization over how the viewer is displayed. The advantage of using the Viewer Tag Library, however, is that it consistently generates efficient code, as the tag implementation has been carefully tested and optimized.

Using the Viewer Tag Library

To use the tags provided by the Viewer Tag Library in a JSP page, a reference to the tag library's descriptor file is required. The following code needs to be added to the top of each JSP page using the tag library:

<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>



Crystal Decisions
http://www.crystaldecisions.com/
Support services
http://support.crystaldecisions.com/