- •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
Web Reports Server Commands
Pre-defined reports created with Seagate Crystal Reports are instantly available to any user connected to your web site via the Internet or an internal intranet.
●Internal reports are available throughout the company with point-and-click simplicity.
●Sales or Management staff can obtain up-to-date data through remote access.
●Corporate information can be published on an extranet for easy access by stockholders and potential investors.
As a web server administrator, you must determine how data is accessed from your web site and exactly how much of the data is available. The Crystal Web Reports Server provides several commands that can be appended to URL requests in web page hyperlinks or passed via HTML Forms (this last option is recommended when accessing large sets of data). In addition, the Crystal Web Reports Server provides the option of automatically prompting users for security information, stored procedure parameters, and parameter field values. Use this section as your toolbox for designing Crystal Web Reports Server-enabled web sites.
NOTE: The features described here allow you to control access to report information on a limited basis. Although the commands described in this section provide a certain level of customization, you should consider using the Crystal Report Engine Automation Server, Page 111, to design web sites if you need more control over report data and formatting at runtime.
The following topics are discussed in this section.
The Crystal Web Reports Server Command Expert, Page 29
Constructing Report Requests, Page 29
Changing Selection Formulas in Web Reports, Page 30
SQL and ODBC Data Sources, Page 31
SQL Stored Procedures and Parameter Fields, Page 34
Report Exporting, Page 36
Refreshing Web Report Data, Page 37
The following commands are discussed in this section.
PROMPT# command, Page 35
GF command, Page 31
INIT command, Page 30
PASSWORD# command, Page 32
PROMPT# command, Page 35
PROMPT# command, Page 35
SF command, Page 31
USER# command, Page 33
Crystal Web Report Server |
28 |
The Crystal Web Reports Server Command Expert
The Crystal Web Reports Server Command Expert was created to help streamline the creation and testing of Hypertext links or HTML forms for referencing reports. With this tool you can specify: the URL of a report to be viewed, database logon values, report parameter field values, Crystal Reports Web Server commands, how to display the report (Crystal Smart Viewer, or HTML page), etc. In addition to displaying the report the Command Expert returns an ISO Latin encoded string containing the report URL and the query string generated from the specifications. It also provides an environment for creating customized object or applet tags for the ActiveX and Java Smart Viewers. To access the Crystal Web Reports Server Command Expert (you must be using one of the following browsers: Netscape Navigator, 4.x or later, or Internet Explorer 4.01, or later,) do the following:
1Select Web Samples and Utilities Page from the Seagate Crystal Reports Program Group menu
2Click on Web Reports Server Command Expert
Constructing Report Requests
When requesting a report from the Crystal Web Reports Server, or when setting up a link to a report from another web page, there are several optional commands available for customizing the information returned. Commands are passed with a report request by appending the URL address of the report with a question mark followed by each query string command you want to use. Commands can be passed in any order and in any combination. All commands are optional; if you do not specify any commands, the original report will be returned.
The following is an example of using query string commands when requesting a report:
http://<localhost>/scrreports/Accounting/
wsale.rpt?sf={customer.Sales}>10000
Note that each command is specified using the following syntax:
command=value
«Where command is the first name of the command, and value is the value you assign to that command. You should also note that the command is preceded by a question mark (?) and additional commands are separated by an ampersand (&).»
It will often be more convenient to embed the request in an HTML page and pass it to the Web Reports Server via a FORM tag, as in the following example:
<FORM ACTION='http://localhost/scrreports/Accounting/ wsale.rpt?sf={customer.Sales}>1000' METHOD='post'>
<input type=submit value='Click Here To Launch the report: http://localhost/ scrreports/Accounting/wsale.rpt?sf={customer.Sales}>1000'>
<input type=hidden name="init" value="html_page">
<input type=hidden name="rf" value="0">
<input type=hidden name="promptOnRefresh" value="0">
</FORM>
Crystal Web Report Server |
29 |
The resulting URL and attached query string look like this:
http://localhost/scrreports/Accounting/ wsale.rpt?sf={customer.Sales}>1000?init=html_page&rf=0&promptOnRefresh=0
INIT command
Specifies how the report should be displayed in the web browser. For example:
init=java
Possible values are:
●java - Crystal Smart Viewer for Java, Page 55
●actx - Crystal Smart Viewer for ActiveX, Page 57
●html_frame - Crystal Smart Viewer for HTML, Page 53 (with frames)
●html_page - Crystal Smart Viewer for HTML, Page 53 (standard)
If the INIT command is not specified, the Crystal Web Reports Server will detect the type of browser requesting a report and will provide a default viewer for that browser. For instance, if the browser is Netscape Navigator 4.0, the Crystal Web Reports Server will display the report using the Crystal Smart Viewer for Java.
NOTE: Not all browsers support all methods of viewing reports. For instance, both the ActiveX viewer and Java viewer are unavailable in versions of Internet Explorer previous to 3.02. Internet Explorer also requires that Authenticode 2.0 be installed. Netscape Navigator does not support the ActiveX viewer at all, and does not support the Java viewer in versions prior to 3.0.
Changing Selection Formulas in Web Reports
In addition to specifying a record or group selection formula when designing a report, you can also change the selection formula using a command appended to the URL of a report called through the Crystal Web Reports Server. As an administrator, you can create one report and design a web page that allows users to choose selection criteria for the information they need. The Crystal Web Reports Server then dynamically generates the requested report with only the selected records.
To specify a record selection in a request for a web report, use the parameter SF command, Page 31. For example:
http://server_name/reports/boxoffic.rpt? sf={studio.Studio}+%3d+'Universal'
This will override any selection formula already contained in BOXOFFIC.RPT. However, the new selection formula will not be saved with the original report file. It is only valid for the currently requested job. The GF command, Page 31 can be used to change a group selection formula in a report.
The Crystal Web Reports Server does not check the validity of any selection formulas you send to a report. If the selection formula you create is invalid, an error will be returned to the web browser. If you are designing a web site that passes selection formulas to reports, be sure to test the selection formulas before allowing users to access your site.
Crystal Web Report Server |
30 |
GF command
Specifies a group selection formula. This command is similar to SF command, Page 31 (selection formula).
GF=<formula>
«<formula> is a selection formula in string format.» For example:
GF= Sum({customer.Sales},{customer.Region})>10000
«Selects all groups in which the sum of all customer sales in each region is greater than 10,000.»
SF command
Specifies a selection formula.
SF=<formula>
«<formula> is a selection formula in string format.» For example:
http://server_name/reports/boxoffic.rpt?sf={studio.Studio}+%3d+”Universal”
«Selects all records where the studio is Universal.»
NOTE: Reports that have the SF# or GF# commands applied will not have their pages shared. Caching will be by user.
SQL and ODBC Data Sources
The Seagate Crystal Web Reports Server opens reports based on SQL servers and ODBC data sources as easily as it opens reports based on smaller, desktop database files. If the data in a report requires access to a secure data source such as an SQL server or ODBC data source, the Web Reports Server will automatically prompt the user requesting the report to provide a user ID and password before it displays report data.Your existing database security continues to work, even over the web.
NOTE: Although the Web Reports Server requires users to log on before it displays reports that access secured databases, security conflicts can arise if several people attempt to access the same report simultaneously. To prevent such conflicts, you should add security to your web site, preventing users from seeing and accessing secured reports. Forcing users to log on to the intranet site is a common solution to providing complete system security.
Crystal Web Report Server |
31 |
The following image is an example of a logon page that the Web Reports Server generates when encountering a report accessing secure data in a Microsoft SQL Server database. Depending on the type of data your reports are based on, the logon page that appears to your users may appear slightly different.
NOTE: If the database security has no password or a blank password, users will not be prompted by the Web Reports Server to log on. To ensure security, make sure databases have valid passwords.
To create hyperlinks in your web pages that handle user IDs and passwords automatically, use the USER# command, Page 33, and PASSWORD# command, Page 32. These commands will let you specify more than one user ID and password if the report connects to two or more secured databases. Keep in mind that if an incorrect user ID or password is sent, the Crystal Web Reports Server will prompt for user name and password again and prevent access to the report.
NOTE: The Crystal Web Reports Server applies a simple encryption algorithm to user names and passwords. If you are using a Microsoft web server, make sure your intranet or extranet site has the Secure Sockets Layer (SSL) encryption protocol installed and enabled to ensure complete security when accessing database information. Due to a documented problem in the Netscape web servers, SLL is not supported by the Web Reports Server on Netscape servers. For more information, refer to Netscape documentation.
PASSWORD# command
Specifies passwords for logging on to SQL, ODBC, or password-protected databases used by the report.
PASSWORD#=<password>
«<password> is a string.»
For example:
password0=secret
Crystal Web Report Server |
32 |
If the report accesses more than one password-protected database, multiple passwords can be passed by incrementing the index number. For example:
password0=secret&password1=mystery&password2=unknown
PASSWORD# is normally used in conjunction with the USER# command, Page 33. For example:
user0=SmithJ&password0=secret&user1=JohnS&password1=mystery
If the report contains subreports that require passwords for logging on to SQL or ODBC data sources, use the following syntax in the URL:
password@subname#=<userid>
«subname is the name of the subreport.»
For example:
user@Crosstab0=jimmys&password$Crosstab0=jimmyz
NOTE: Make sure passwords appear in the URL in the same order in which the password-protected databases appear in the report. Additionally if passwords are not passed using the URL address, the user will be prompted for logon information at runtime.
USER# command
Specifies user IDs for logging on to SQL or ODBC databases used by the report.
USER#=<userids>
«<userids> is a string.»
For example:
user0=SmithJ
If the report accesses more than one password-protected database, multiple user IDs can be passed by incrementing the USER index number. For example:
user0=SmithJ&user1=JohnS&user2=JSmith
USER# is normally used in conjunction with the PASSWORD# command, Page 32. For example:
user0=SmithJ&password0=secret&user1=JohnS&password1=mystery
If the report contains subreports that require user IDs for logging on to SQL or ODBC data sources, use the following syntax in the URL:
user#@subreportname
For example:
user0@Crosstab=jimmys&password0Crosstab=jimmyz
Crystal Web Report Server |
33 |