You can also include an initialization string specifying the type of viewer to be used. This optional parameter may be written as init='ViewerType' where ViewerType may be any one of the following:
Be careful when using this parameter, however, since you need to know what type of browser the user is using.
Note: If you wish to reconnect to the Page Server within the same browser session, you can append the CONNECT parameter to the initialization string. This allows the user to re
The following function checks to see which browser the client is using: Netscape Navigator or Internet Explorer. It then selects either the Navigator plugin or the ActiveX viewer.
//Prompt for browser information.
BrowseInfo = String(Request.ServerVariables.Item("HTTP_USER_AGENT"));
//If the browser is Internet Explorer, then use ActiveX.
if (BrowseInfo.search(/MSIE/i) !=
//This is not Internet Explorer, use the Navigator plugin.
else if (BrowseInfo.search(/MSIE/i) ==
The line to load the viewer may then be modified as follows:
"<a target='_blank' href='viewrpt.cwr
Server.URLEncode(LogonToken) + "&init=" + GetViewer() + "'> View Report</A>"
While this lesson may not cover everything there is to know about Report Viewers, it should give you a general understanding of how to load a Report Viewer and display a report.
For more information on Crystal Report Viewers, see Crystal Web Request (CWR).
For information on viewing reports that contain parameters, see Viewing a report containing specific parameter values.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |