- •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
Crystal Smart Viewer Overview
This topic is only supported by the Professional Edition of Seagate Crystal Reports.
Seagate Crystal Reports provides several methods for viewing reports from a web browser. Actually adding a viewer by directly editing the web page is not normally necessary. The Crystal Web Reports Server, for example, can detect a user’s web browser type when a report is requested, and automatically provide an appropriate viewer. If, on the other hand, you develop web sites using Microsoft Visual InterDev and the Crystal Design-Time ActiveX Control, you can select a viewer using the design-time control, and the appropriate code will be added to your site automatically.
As a reference, the following table illustrates the Crystal Smart Viewer that is defaulted to by the Web Reports Server based on the web browser being used by a client:
Client Side Browser |
Default Viewer Returned |
Other Optional Viewers |
|
|
|
|
|
|
Internet Explorer 3.02, 4.0, 5.0 |
ActiveX |
Java, HTML Frame, HTML Page |
|
|
|
Netscape Navigator 2.x, 3.x, 4.x (32 bit) |
Java |
HTML Frame, HTML Page |
|
|
|
Netscape Navigator 4.x (16 bit) |
HTML Frame |
Java, HTML Page |
Netscape Navigator 3.x (16 bit) |
HTML Frame |
HTML Page |
Netscape Navigator 2.x (16 bit) |
HTML Page |
None |
|
|
|
Internet Explorer 2.0 |
HTML Page |
None |
|
|
|
Other Browsers |
HTML Page |
None |
|
|
|
Although changing these defaults is not necessary, there may be times when you need to manually write web pages that display a specific viewer despite the browser being used, or when you want to customize your web site by editing the code created by the design-time control. This chapter explains how to understand and work with the Crystal Smart Viewers directly in your web pages.
If you are designing web sites using one or more of the Crystal Smart Viewers, be aware that only the Java Viewer can be directly assigned a report file through one of its parameters. This means that the Web Reports Server, in most cases, must provide the Smart Viewer for you, and any customization must be done through the The Web Reports Server Configuration Application, Page 16. If you develop sites using the Crystal Report Engine Automation Server, though, or if you connect to the Web Reports Server from Active Server Pages or Visual Basic, you have several options for configuring the Smart Viewers. For further information on using Crystal Smart Viewers inside Active Server Pages, refer to Customizing the Crystal Smart Viewer, Page 47. For further information on connecting to the Web Reports Server from Visual Basic, see Connecting to the Web Reports Server, Volume 3, Chapter 1.
NOTE: This chapter is intended as a supplement to the web design solutions presented in Seagate Crystal Web Reports Server Overview, Page 2, and Building Active Web Sites, Page 43. It is assumed that you are familiar with the concepts in at least one of those two chapters.
Configuring the Crystal Smart Viewers |
50 |
Features of the Crystal Smart Viewers
Seagate Crystal Reports provides rich and powerful reporting features for data analysis and presentation. Ideally, web presentations of reports will maintain those report features. Several of the Crystal Smart Viewers are designed to provide this power asit exists in the original report.
Web administrators often have important reasons for choosing one web technology over another when presenting information on a web site. When deciding on the Smart Viewer technology used on your web site, you should consider the reporting features provided by each Smart Viewer and be aware of any limits that a particular web technology might impose on the Crystal Smart Viewers.
The following table illustrates what major reporting features are available in each of the Crystal Smart Viewers:
Features |
ActiveX |
Java |
Java Bean |
HTML |
HTML |
|
Frames |
Page |
|||||
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
View Graphs |
Yes |
Yes |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
View embedded maps |
Yes |
Yes |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
Smart Navigation Tree |
Yes |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
|
Drill down on graphs & summarized data |
Yes |
Yes |
Yes |
|
|
|
Export to Word, Excel, HTML, RPT |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
|
|
Change Record Selection Expert |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
|
|
Search for specific data value |
Yes |
Yes |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
View subreports |
Yes |
Yes |
Yes |
Yes |
Yes |
|
Drill on out of place subreports |
Yes |
Yes |
Yes |
|
|
If your reports make use of a particular reporting feature, verify that feature is available in the Smart Viewer you choose before designing your site.
Printing from the Crystal Smart Viewers
When you create a report in Seagate Crystal Reports, the program analyzes the printer that is currently selected for your system to determine font size and how to size and position objects, such as field objects and text objects on the report. If the report is then printed to a printer other than the one selected when it was created, problems with font size, clipped text, and pagination may arise.
With this in mind, consider what may happen when a report is created on one machine, served over the network by a web server on a second machine, and viewed or printed from a web browser through a Crystal Smart Viewer on a third machine. If each of these machines is connected to a different printer, report formatting problems may be compounded.
Configuring the Crystal Smart Viewers |
51 |
Consider a report that is designed and formatted on the first machine, where printer settings are used to determine font size and the size and position of objects in the report. When the web server generates that report, the printer it is connected to may force the length and size of a font to change. However, the field and text objects will maintain a fixed size and position. Thus, generating the report on the web server may cause text to be clipped or may create extra blank spaces between fields.
If, however, some report objects are formatted with the Can Grow formatting option, these objects will resize themselves as the size of the text font is resized by the new printer. Once resized, though, those objects may change the pagination.
The Crystal Smart Viewer for Java and the Crystal Smart Viewer for HTML will display the report in a web browser as it is generated by the web server, so these formatting problems may affect how reports appear to users. The Crystal Smart Viewer for Java does not allow a user to print a report from the web browser due to restrictions in the Java language. The Crystal Smart Viewer for HTML will simply print the HTML page exactly as it appears in your web browser. In contrast, the Crystal Smart Viewer for ActiveX allows you to print a formatted report from a web browser. As a result, an additional level of formatting problems may appear in the printed report if the machine on which the web browser is running is connected to a third printer with different settings.
When designing reports that will be viewed through one of the Crystal Smart Viewers, use report fonts common on all systems to prevent resizing and pagination problems, and always test reports on a client machine before distributing them to users.
Using Crystal Smart Viewers in Applications
Viewing reports is not exclusive to web sites, and you may find a need for client side applications that display reports on screen to users. The Crystal Smart Viewer/ActiveX and the Crystal Smart Viewer/Java Bean are fully functional components that can be added to applications written in Microsoft Visual Basic, Borland Delphi, Symantec Visual Cafe, and many other development environments that support ActiveX controls or Java Beans.
NOTE: The Crystal Smart Viewer/Java Bean is intended primarily for application development and is, therefore, not discussed in this chapter. Instead, this chapter concentrates on the Smart Viewers intended for web site development and that can be distributed by the Web Reports Server or added using the Crystal Design-Time ActiveX control.
A common use of the Crystal Smart Viewers in application development is when designing N-tier applications that may use the Crystal Web Report Server, Page 1, the Seagate Crystal Report Engine Automation Server, Page 44, or the The Report Designer Component, Page 145, as a middle tier and the Smart Viewer as part of the client user interface. For more information on using the ActiveX and Java Bean versions of the Crystal Smart Viewers in application design, see Application Development with Crystal Smart Viewers, Volume 3, Chapter 1.
Configuring the Crystal Smart Viewers |
52 |