- •Seagate Crystal Web Reports Server Overview
- •What is the Web Reports Server?
- •Who should use the Web Reports Server?
- •Web Reports Server Features
- •New Features in Version 7
- •The Web Reports Server vs. Active Server Pages
- •Sample Web Sites
- •Implementing the Web Reports Server
- •Choosing a Web Reports Server
- •System Requirements
- •Installing the Web Reports Server
- •Confirming Correct Installation
- •Virtual Directories
- •Creating a Web Site
- •For More Information
- •Crystal Web Reports Server Administration
- •The Web Reports Server Configuration Application
- •Page Server Tab
- •Image Server Tab
- •Report Exporting Tab
- •Server Mappings Tab
- •Report Viewing Tab
- •The Page Server and the Image Server
- •Smart Navigation
- •Drilling Down on Data
- •Database Location
- •Web Reports Server Commands
- •The Crystal Web Reports Server Command Expert
- •Constructing Report Requests
- •Changing Selection Formulas in Web Reports
- •SQL and ODBC Data Sources
- •SQL Stored Procedures and Parameter Fields
- •Report Exporting
- •Refreshing Web Report Data
- •Web Reports Server Architecture
- •The Web Reports Server Extension
- •The Seagate Crystal Web Image Server
- •The Seagate Crystal Web Page Server
- •Report Processing
- •Job Manager Overview
- •Seagate Crystal Report Engine Automation Server
- •Visual InterDev Design-time ActiveX Control
- •Using an Existing Report
- •Building a Report at Runtime
- •Editing Active Server Pages
- •Customizing the Crystal Smart Viewer
- •Modifying the Report
- •Session Timeout
- •Sample Web Site
- •Crystal Smart Viewer Overview
- •Features of the Crystal Smart Viewers
- •Printing from the Crystal Smart Viewers
- •Using Crystal Smart Viewers in Applications
- •Crystal Smart Viewer for HTML
- •Limitations of HTML Reports
- •Crystal Smart Viewer for Java
- •Adding the Viewer to a Web Page
- •Crystal Smart Viewer for ActiveX
- •AuthentiCode Certification
- •Adding the Viewer to a Web Page
- •Downloading the Viewer from the Server
- •ActiveX Viewer Example
- •Introduction to the Crystal Report Engine
- •Before using the Crystal Report Engine in your application
- •Using the Crystal Report Engine
- •Crystal Report Engine API
- •Declarations for the Crystal Report Engine API (REAPI)
- •Using the Crystal Report Engine API
- •The Print-Only Link
- •The Custom-Print Link
- •Working with Parameter Values and Ranges
- •Working with section codes
- •Crystal Report Engine API variable length strings
- •Crystal Report Engine API structures
- •Working with subreports
- •Changing report formats
- •Exporting reports
- •PEExportTo Overview
- •PEExportOptions Structure
- •Considerations when using the export functions
- •Handling Preview Window Events
- •Distributing Crystal Report Engine Applications
- •Additional Sources of Information
- •Using the Crystal Report Engine API in Visual Basic
- •When to Open/Close the Crystal Report Engine
- •Embedded Quotes in Visual Basic Calls to the Crystal Report Engine
- •Passing Dates/Date Ranges in Visual Basic using the Crystal Report Engine API Calls
- •Identifying String Issues in Visual Basic Links to the Crystal Report Engine
- •Hard-coded Nulls in Visual Basic User Defined Types
- •Visual Basic Wrapper DLL
- •Crystal ActiveX Controls
- •Adding the ActiveX Control to your Project
- •Using the ActiveX Controls
- •Upgrading from the Crystal Custom Control
- •Crystal Report Engine Automation Server
- •Adding the Automation Server to your Visual Basic Project
- •Using the Automation Server in Visual Basic
- •Object Name Conflicts
- •Viewing the Crystal Report Engine Object Library
- •Handling Preview Window Events
- •Distributing the Automation Server with Visual Basic Applications
- •Sample Applications
- •Active Data Driver
- •Data Definition Files
- •Using the Active Data Driver
- •Creating Data Definition Files
- •Using ActiveX Data Sources at Design Time
- •Crystal Data Object
- •CDO vs. the Crystal Data Source Type Library
- •Using the Crystal Data Object
- •Crystal Data Object Model
- •Crystal Data Source Type Library
- •Creating a new project and class
- •Adding the type library
- •Implementing the functions
- •Passing the CRDataSource object to the Active Data Driver
- •Crystal Data Source Projects
- •Grid Controls and the Crystal Report Engine
- •Bound Report Driver and Bound Report Files
- •Crystal ActiveX Control Properties
- •Creating a Bound Report using the Crystal ActiveX Control
- •Creating a Formatted Bound Report
- •Creating a Formatted Bound Report at Runtime
- •Sample Application
- •ActiveX designers
- •The Report Designer Component vs. Seagate Crystal Reports
- •Data Access
- •No drag and drop between reports – use copy and paste
- •Conditional Formatting
- •Preview Window
- •Pictures
- •Guidelines
- •Subreports
- •The dual formula environment
- •Application Distribution
- •Installing the Report Designer Component
- •System Requirements
- •Installation
- •Using the Seagate Crystal Report Designer Component
- •Adding the Report Designer Component to a Project
- •Selecting Data
- •The Report Expert
- •Adding the Smart Viewer
- •Running the Application
- •CrystalReport1 - The Report Designer Component
- •CRViewer1 - The Smart Viewer Control
- •The Code
- •Report Packages
- •Working with data
- •ADO and OLEDB
- •Connecting to data with ADO
- •Connecting to data with RDO
- •Connecting to data with DAO
- •Data Environments
- •Data Definition Files
- •Report Templates
- •ODBC, SQL, and PC data sources
- •Report Designer Overview
- •Introduction to the Report Designer Component
- •Report Designer Architecture
- •Report Designer Object Model Programming
- •Report Designer Object Model Introduction
- •Obtaining a Report object
- •Displaying the report in the Smart Viewer
- •Setting a new data source for the report
- •Using ReadRecords
- •Passing fields in the correct order
- •Working with secure data in reports
- •Handling the Format event
- •Changing the contents of a Text object
- •Changing OLE object images
- •Working with Sections
- •Working with the ReportObjects collection
- •Working with the FieldObject object
- •Working with the SubreportObject object
- •Working with the Database and DatabaseTables objects
- •Working with the CrossTabObject object
- •Exporting a report
- •The Application object
- •Report events
- •Microsoft Access Sessions
- •Programmatic ID
- •Report Distribution Considerations
- •Distributing reports as part of the application
- •Saving reports as external files
- •Saving data with reports
- •VCL Component Overview
- •Installation
- •Delphi 2
- •Delphi 3 & 4
- •C++ Builder 3
- •Programming Overview
- •Introduction to the Object Inspector
- •Changing Properties in the Object Inspector
- •Changing Properties at Runtime
- •Delphi Programmers introduction to the SCR Print Engine
- •Dealing with SubClass Objects
- •Consistent Code
- •Using the Retrieve method
- •Working with subreports
- •Other Guidelines
- •Programming Tips
- •Always Set ReportName First
- •Discard Saved Data
- •Verify Database
- •Connecting to SQL Servers
- •Changing Tables & Formulas
- •Changing Groups & Summary fields
- •Using the Send methods
- •Using the JobNumber property
- •TCrpeString
- •Introduction
- •TCrpeString VCL Properties
- •Using the TCrpeString
- •Using Variables with Formulas
- •Introduction
- •Examples
- •About Section Names
- •Introduction
- •Methodology
- •StrToSectionCode
- •C++ Builder 3
- •Introduction
- •Code Syntax
- •Additional Code Examples
- •Known Problems
- •Retrieving ParamFields from a Subreport
- •DialogParent and Temporary Forms
- •Technical Support
For example:
let's say that a user would like the report test.rpt downloaded to his browser in Microsoft Word format. The URL (ISO - Latin encoded) would be the following:
http://mycomputer/test.rpt?cmd=EXPORT&EXPORT_FMT=U2FWORDW%3A0
Refreshing Web Report Data
When a report contains saved data, the report does not need to access any databases when retrieved from the Crystal Web Reports Server. This can greatly reduce network traffic and the use of network server resources when many people are frequently requesting reports. For this reason, you may want to design most of your reports so that they contain saved data. Additionally, reports containing saved data can be easily cached by the Web Reports Server for optimized job sharing, serving more users with the same information simultaneously. However, if a report contains saved data, and changes are made in the original database, the report will no longer reflect accurate information. To update the report, you can open it in Seagate Crystal Reports, refresh the data, and save the report again. However, the Crystal Web Reports Server also provides a means to dynamically refresh report data.
As a web system administrator, you must decide if you want to allow users to refresh report data themselves, or if you want to control how and how often they can refresh report data. Each of the Crystal Smart Viewers, for instance, includes a button to refresh the data while it is viewed. However, sites with several users refreshing report data can result in network and system slow downs since every refresh requires connecting to a database and gathering data.
You can override or even disable the users capability for refreshing and create other means for keeping up to date data in reports. One method is to set automatic refreshes using the Database Refresh Time, Page 19, setting in the Advanced Settings, Page 18, of the Web Reports Server Configuration application.
When deciding how data will be refreshed at your web site, keep in mind that frequent refreshes of report data limits report caching capabilities of the Web Reports Server. Every time the report is refreshed, any cached version of that report becomes obsolete. Thus, too many refreshes eliminate the ability to serve cached versions of frequently requested reports.
Web Reports Server Architecture
An understanding of the architecture of the Web Reports Server can improve your deployment of web sites and assist with major troubleshooting tasks. In fact, the Web Reports Server consists of three separate components: the Web Reports Server extension, the Image Server, and the Page Server. The interaction of these three systems has been designed to optimize the handling of requests and the delivery of reports at runtime.
The following topics are discussed in this section.
The Web Reports Server Extension, Page 38
The Seagate Crystal Web Image Server, Page 39
The Seagate Crystal Web Page Server, Page 39
Report Processing, Page 40
Job Manager Overview, Page 41
Crystal Web Report Server |
37 |
The following diagram illustrates the components of the Web Reports Server.
The Web Reports Server Extension
The server extension for Crystal Web Reports communicates directly with your web server. When you install the Crystal Web Reports Server, two new file extensions are established on your system: .rpt and .cri. When your web server receives a request for either of these file types, it directs the request toward the Web Reports Server extension (CRWeb). The Web Reports Server extension then determines what application should be used to process the request, the Image Server (.cri) or the Page Server (.rpt). Once a request is processed, the server extension also handles returning the data to the web server for delivery to the client’s browser. This is the main point of contact between the web server and the back-end report processing servers.
There are actually two versions of the Web Reports Server. One has been designed specifically for Microsoft and Netscape web servers, while the other can run on most CGI compliant Windows based web servers.
ISAPI/NSAPI
The Web Reports Server extension implemented in CRWEB.DLL is both an ISAPI and NSAPI extension. By utilizing the API extensions exposed by Microsoft and Netscape web servers, CRWEB.DLL produces a faster, more robust system for report delivery to the web server.
The ISAPI extension is supported by Microsoft Internet Information Server (IIS) versions 2.0 and later. Additionally, the Personal Web Server available for Windows NT Workstation, Windows 95, and Windows 98 also supports ISAPI extensions.
The NSAPI programming interface is available on all Netscape web servers.
Crystal Web Report Server |
38 |
CGI
A second implementation of the Web Reports Server extension exists in the file CRWEB.EXE. This application conforms to the CGI standard. If you are using a web server other than a Microsoft or Netscape server, the CGI version of the Web Reports Server can easily be installed with your existing web server software.
The Seagate Crystal Web Image Server
When a report is rendered in HTML, graphic images, maps, graphs, charts, and OLE objects are rendered as Crystal Image (.CRI) files and stored by the Page Server module. When the Web Reports Server encounters a Crystal Image inside of the HTML report, it asks the Image Server to interpret it. The Image Server translates the image into a form that can be displayed by browsers (such as JPEG format), and sends the image back to the Web Reports Server for distribution through the web server.
NOTE: Crystal Image files are not used if the report is rendered as an Encapsulated Page File (EPF) for display inside the Crystal Smart Viewers for ActiveX, Java, or Java Beans.
Running Image Server as an NT Service
On Windows NT systems, the Image Server can be set up to run as an NT service. It is installed under a system account by default. NT services run in the background and do not require a user or administrator to be logged on to the web server machine. Most web server systems should run the Image Server as an NT service for best performance.
The Image Server appears as Crystal Web Image Server in the Windows NT Services control panel.
The Seagate Crystal Web Page Server
NOTE: This section refers to the Job Manger which is the component responsible for implementing report sharing and page caching among other thing. Refer to the section titled Job Manager overview for a general description of how page caching and report sharing are implemented.
The Page Server is the most complex piece of the Crystal Web Reports Server system. It is actually made up of several smaller components each responsible for handling specific parts of the report processing task. It’s primary job, though, is to receive a request for an .RPT report file from the Web Reports Server, generate the report, and return it in a form that can be viewed by a web browser.
NOTE: The Web Reports Server limits report caching features with reports based on SQL stored procedures or that include parameter fields. Such reports may generate a different set of data every time they are requested, due to the dynamic values passed to the parameter field or stored procedure. Thus, multiple requests for the same report may actually produce separate report jobs.
Crystal Web Report Server |
39 |
Report Formats
When the Page Server generates a report, it will translate it into either HTML pages or Encapsulated Page File (EPF) pages. The output depends on how the report will be viewed in the browser. If the browser requests viewing a report as HTML or HTML frames, the Page Server will generate HTML pages containing Crystal Images where appropriate. (Crystal Images are, in turn, interpreted by the Image Server. See The Seagate Crystal Web Image Server, Page 39.) If the browser requests to view a report inside the Java viewer or the ActiveX viewer, then the Page Server generates EPF pages.
HTML and HTML frames can be viewed inside any browser that supports the HTML 3.02 standard. This general standard makes HTML reports ideal for sites that may use a wide range of browsers or in secure sites that do not allow ActiveX controls or Java applets. However, HTML is a limited display format, and reports may lose some of the design features available in Seagate Crystal Reports.
EPF is a Seagate format based on the Encapsulated Postscript format (EPS). As a result, EPF reports can handle complex layout and design descriptions. When viewed inside the browser, EPF reports retain most if not all of the design and layout elements of the report originally created in Seagate Crystal Reports, providing a cleaner, more accurate display of the information. As a proprietary format, though, EPF reports can only be displayed inside the ActiveX or Java based Smart Viewers.
NOTE: EPF files do not retain formatting information set by printer drivers. Examples of such formatting include page size and page orientation.
Report Processing
When the Page Server gets a request for a new report, it must obtain a new request Id from the Job Manager and determine if the Job Manager needs to obtain a new job Id from the Report Engine. If a new job Id is required, the Report Engine must actually generate a new report. The interaction between the Page Server, the Job Manager, and the Report Engine has been designed to maximize performance in intranet and extranet environments.
The Crystal Reports Job Manager must generate new request Ids for every request the Web Reports Server receives. If the Page Server determines that the requested report already exists in the cache, it will simply obtain a new request Id from the Job Manager, then match that request to the job Id of the existing report. If the report has not been cached, the Page Server must obtain a new job Id from the Job Manager, as well as a new request Id.
If the Page Server demands a new report job Id from the Job Manager, the Job Manager will start the Report Engine and have it generate the new report. The Report Engine creates a job Id for the new report and returns it to the Job Manager which, in turn, returns both the job Id and the request Id to the Page Server.
Report Engine
The Report Engine is the component which actually generates reports. The Report Engine opens a requested RPT file, locates the necessary data, and produces a complete report file. If you are an application developer, this is the same Report Engine that you can add to your own applications (see Crystal Report Engine, Page 63 for more information). Every report produced by the Report Engine has a unique job Id to identify that report. The Page Server uses the job Id to determine what actual report must be used for a specific client request.
Crystal Web Report Server |
40 |