- •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
Passing the Recordset to the Report Designer Component
The Recordset object gets passed to the Report Designer Component through the SetDataSource method. Using the Recordset object from the example above, and assuming your report object is named Report, the following demonstrates how to assign a new data source at runtime:
Report.Database.SetDataSource rs
For more complete information, see Setting a new data source for the report.
Report Templates
If a Crystal Report file already exists that closely resembles the report you want to create, and it connects to the same or similar data and displays the data in a desirable fashion, you can use the existing report file as a report template. When you select the existing report, a copy of the report is created and set up as the basis of your new report in the Report Designer Component. The original report file is never changed.
To use a report template:
1Begin by adding the Report Designer Component to your Visual Basic project (see Adding the Report Designer Component to a Project).
2When the Report Gallery appears, click Import Report. The Open dialog box appears.
3Use the Open dialog box to locate and select an existing Crystal Report file. These files have .rpt extensions.
4Click Open. The Crystal Report Expert dialog box appears.
5Indicate whether or not you want a form containing the Crystal Smart Viewer added to your report, and, if so, whether or not this form should be the start-up form for your application.
6Click OK. An instance of the Report Designer Component appears in your project. The designer contains a new report design based on the report file you selected.
The data source accessed by the new report is identical to the data source used by the original report file. The following procedure describes how to change the location of the data source. Keep in mind, though, the structure of the new data source must match the original data source. For instance, relational databases must have identical tables and fields.
1In the Field View of the Report Designer Component window, click the plus sign next to Database Fields. A list of all data connections will appear. If the report connects directly to a database, you will see a list of database tables. If the report uses a connection technology, such as ADO, you will see ado in the list.
2Right-click one of the data connections in the list and select SET LOCATION from the shortcut menu. The Set Location dialog box appears.
3In the Databases list, select the database table or other data connection that you want to change the location of, and click Set Location. A dialog box appropriate to the connection type appears. The remaining steps assume the data connection is an ADO connection.
4With the Choose SQL Table dialog box open (the dialog box that appears when setting the location of an ADO data source), click Log On Server. The Log On Server dialog box appears.
The Report Designer Component |
167 |
5 Highlight Active Data (ADO) in the Server Type drop-down list, and click OK. The Select Data Source dialog box appears. Use this dialog box to select a new ADO data source. For instructions on using this dialog box, see Selecting Data.
6Click Next, and the Select Recordset dialog box appears. Specify a new recordset for your report.
7Click Finish, and the new ADO connection appears in the SQL Databases list box of the Choose SQL Table dialog box.
8Highlight the new ADO connection, and click OK. The new data source is reflected in the Set Location dialog box.
9Click Done, and the report in the Report Designer Component window is updated.
ODBC, SQL, and PC data sources
Local and remote data sources not accessed through an object model (such as ADO or DAO) are available to the Report Designer Component if you have installed the full Seagate Crystal Reports product. The Report Designer Component can use the same database drivers that are available through Crystal Reports. This includes ODBC data sources, SQL server database systems, NT event logs, and Web server logs for Microsoft and Netscape web servers.
When connecting to an ODBC, SQL, or PC data source, the Report Designer Component provides an interface much like the Seagate Crystal Reports interface. If you click the Custom button on the Data Tab of the Create Report Expert, the Log On Server dialog box appears, providing access to ODBC data sources and SQL server database systems. If you then click the Database File button, the Choose Database File dialog box appears. Use this dialog to open xBase, Paradox, Btrieve, or Microsoft Access databases.
Connecting to an ODBC or SQL data source
The following tutorial shows how to connect to an ODBC or SQL data source while designing a report in the Report Designer Component. The tutorial begins from the Data Tab of the Create Report Expert. You could also begin by selecting the Add Database to Report command from a shortcut menu that appears when you right-click inside the Design window of the Report Designer Component.
1On the Data Tab of the Create Report Expert, click Custom. The Log On Server dialog box appears.
2If your data exists in a standard PC or ISAM database such as Microsoft Access, Borland dBASE, Btrieve, or Microsoft FoxPro, see the section below titled PC Databases. If your data is in a SQL or ODBC data source, continue with the next step.
3Use the Server Type list box in the Log On Server dialog box to select the type of data source you will use in your report. For example, to connect to the Xtreme sample data ODBC data source, select ODBC - Xtreme sample data.
4Click OK. If the SQL server or ODBC data source requires log on information, a dialog box will prompt you for the correct information. Log on to the data source as you normally do to access the data. The Choose SQL Table dialog box appears.
5Use the SQL Tables list in the Choose SQL Table dialog box to select tables from the data source to use in your
The Report Designer Component |
168 |