- •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
actual data source until runtime. This option can be especially helpful if you need to manipulate the data at runtime in response to user actions or other conditions.
If you have installed the full Seagate Crystal Reports product, all of the data source drivers provided by Seagate Crystal Reports are also available to the Report Designer Component. Instant and convenient report design based on SQL servers, NT event logs, ODBC data sources, and web server log files is provided right inside the Visual Basic environment.
With so many options for connecting to data, selecting a single data access technology can become daunting. The following sections describe each data access option and suggest guidelines for choosing a specific technique. Keep in mind, though, the ultimate decision for data access should depend on your particular data.
The following topics are discussed in this section.
ADO and OLEDB, Page 159
¾Connecting to data with ADO, Page 160 RDO, Page 161
¾Connecting to data with RDO, Page 162 DAO, Page 162
¾Connecting to data with DAO, Page 163 Data Environments, Page 163
Data Definition Files, Page 164 Report Templates, Page 167
ODBC, SQL, and PC data sources, Page 168
ADO and OLEDB
ActiveX Data Objects (ADO) and OLEDB are the new data connection technologies designed to provide a common interface for working with relational databases, mail messaging, event logs, and most any form of data storage. In addition, ADO provides a method of working with data that is easier and faster than previous technologies such as DAO and RDO. For more information on ADO, refer to Microsoft documentation.
ADO can be used to connect to any ODBC or OLE DB compliant data source when you design your report in the Report Designer Component. The resulting ADO Recordset is not directly available from the Report Designer Component, but it can be replaced by alternative Recordset objects. For example, if your Visual Basic application allows users to make choices that can affect the set of data displayed by a report, simply create a new ADO Recordset at runtime, then pass it to the Report Designer Component using the SetDataSource method. The only restriction is that the fields in the new Recordset match the fields originally used to design the report. For more information on using the SetDataSource method, see Setting a new data source for the report.
The Report Designer Component |
159 |
ADO is the most flexible option for data access. It provides a means of connecting to all kinds of data, including mail messaging, event logs, and Web server site data. In addition, it has been designed, ultimately, to replace DAO and RDO. Developers creating new applications using Visual Basic should strongly consider ADO for data connections. In addition, Web site developers working with Visual InterDev will have an advantage using ADO with Active Server Pages.
Connecting to data with ADO
The Report Designer Component provides two options for connecting to a data source via ADO: specifying an ODBC data source or specifying an ADO connection string.
To specify an ODBC data source:
1On the Data Tab of the Create Report Expert, click Project. The Select Data Source dialog box appears.
2Verify the ODBC option is selected, and click Advanced. The Advanced Options dialog box appears.
3Verify ADO is selected as the technology to connect to your data source, and click OK.
4Select an ODBC data source from ODBC option drop-down list. For this example, select Xtreme sample data.
5Click Next in the Select Data Source dialog box. The Select Recordset dialog box appears.
6If the data source requires log on information, enter a user name and password in the Logon section of the dialog box.
7In the Recordset section of the dialog box, select either Pick from a list of Database Objects or SQL.
●The Pick from a list option provides a list of object types and objects for each type. For this example, verify that Pick from a list is selected.
●The SQL option allows you to write a SQL query statement. The Build button next to the SQL option opens the Microsoft Query Builder and allows you to visually design a SQL query.
8Select Table from the Object Type drop-down list.
9From the Object drop-down list, select Customer.
10Click Finish in the Select Recordset dialog box. ado appears in the list of Tables on the Data Tab of the Create Report Expert.
To specify a connection string:
1On the Data Tab of the Create Report Expert, click Project. The Select Data Source dialog box appears.
2Select the ADO and OLEDB option in the dialog box.
3In the Connection String text box, enter a valid ADO connection string. A connection string can simply indicate the name of an ODBC data source, or it can contain complete information for connecting to the data source. For example, the following string connects to the Xtreme sample data ODBC data source:
DSN=Xtreme sample data;
The Report Designer Component |
160 |
The following string, however, connects to the pubs database in Microsoft SQL Server using the data source name Publishers:
DATABASE=pubs;DSN=Publishers;UID=sa;Password=;
For more information on connection strings, refer to the Microsoft documentation on ADO.
4This example uses the first connection string shown above, a simple connection to the Xtreme sample data ODBC data source. Click Next after you enter the connection string. The Select Recordset dialog box appears.
5If the data source requires log on information, enter a user name and password in the Logon section of the dialog box.
6In the Recordset section of the dialog box, select either Pick from a list of Database Objects or SQL.
●The SQL option allows you to write a SQL query statement. The Build button next to the SQL option opens the Microsoft Query Builder and allows you to visually design a SQL query.
●The Pick from a list option provides a list of object types and objects for each type. For this example, verify that Pick from a list is selected.
7Select Table from the Object Type drop-down list.
8Select Customer from the Object drop-down list.
9Click Finish in the Select Recordset dialog box. ado appears in the list of data source Tables on the Data Tab of the Create Report Expert.
RDO
Remote Data Objects (RDO) is designed specifically for working with remote data sources. This includes ODBC and most common SQL database systems. In fact, RDO acts as an object-oriented wrapper around the ODBC API. The flexibility of ODBC is available to Visual Basic programmers through the simplicity of a COM based object model. Already a common choice for developers of client/server systems, RDO allows the execution of stored procedures and the processing of asynchronous operations, meaning your users can continue to work while your application processes a data query in the background.
The basic object used to manipulate data in RDO is a Resultset (specifically, the rdoResultset object). A new Resultset can be defined in your Visual Basic application and passed to the Report Designer Component at runtime using the SetDataSource method. The RDO data source used to initially create your report at design time, however, is not available for direct manipulation. Instead, information about the connection to the data source is stored inside the instance of the Report Designer Component that you add to your application. By creating a new Resultset at runtime, though, and passing the Resultset to the Report Designer Component, you can control the data in a report based on user requests and responses. For more information on using the SetDataSource method, see Setting a new data source for the report, Page 176.
RDO provides a powerful connection to remote data sources through ODBC. If you are designing a client/ server application, or any application that needs to connect to a large database system such as Microsoft SQL Server, Oracle, or Sybase Adaptive Server, RDO can provide a strong solution. However, RDO limits your application to standard relational database systems. Other sources of data, such as e-mail and messaging servers, system logs, and Internet/intranet server logs are unavailable to RDO. Developers designing webbased applications using Visual InterDev would also be served better by ActiveX Data Objects (ADO).
The Report Designer Component |
161 |
Connecting to data with RDO
Use the following steps as a guide for connecting to an ODBC data source through RDO:
1On the Data Tab of the Create Report Expert, click Project. The Select Data Source dialog box appears.
2Verify the ODBC option is selected, and click Advanced. The Advanced Options dialog box appears.
3Select RDO as the technology to connect to your data source, and click OK.
4Select an ODBC data source from the ODBC option drop-down list. For this example, select Xtreme sample data.
5Click Next in the Select Data Source dialog box. The Select Recordset dialog box appears.
6If the data source requires logon information, enter a user name and password in the Logon section of the dialog box.
7In the Recordset section of the dialog box, select either Pick from a list of Database Objects or SQL.
●The Pick from a list option provides a list of object types and objects for each type. For this example, verify that Pick from a list is selected.
●The SQL option allows you to write a SQL query statement. The Build button next to the SQL option opens the Microsoft Query Builder and allows you to visually design a SQL query.
8Select Table from the Object Type drop-down list.
9Select Customer from the Object drop-down list.
10Click Finish in the Select Recordset dialog box. rdo appears in the list of Tables on the Data Tab of the Create Report Expert.
DAO
Data Access Objects (DAO) is designed primarily for use with local and ISAM (Indexed Sequential Access Method) data sources created through applications such as Microsoft Access, Microsoft FoxPro, and Borland dBASE. Although DAO can be used to connect to ODBC data sources, RDO and ADO provide more powerful options for such data. However, DAO is the oldest of the three technologies, giving it the advantage of being familiar to many Visual Basic programmers. As a result, DAO is also frequently found in existing applications, and applications created with older versions of Visual Basic.
If you are adding the Report Designer Component to a Visual Basic application that already uses DAO, or if you are connecting to a local data source such as an Access or dBASE file, you should consider using DAO to design your reports. Experienced Visual Basic programmers familiar with the DAO object model may also want to stick with a known technology. However, if you are working with ODBC or other remote data sources, RDO and ADO may be a better solution.
Once you design your report in the Report Designer Component, information about the connection to your DAO data source is stored with the report, and can not be accessed directly. However, you can change the data displayed by a report by changing the data source at runtime using the SetDataSource method. A DAO Recordset object may be passed to the report through this method. Keep in mind, though, the Recordset must have fields identical to those in the original data source used at design time.
For more information on using the SetDataSource method, see Setting a new data source for the report.
The Report Designer Component |
162 |