- •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
With the Report Designer Component, you build a report much like the way you build a form in Visual Basic:
●call up the designer,
●add objects,
●set properties,
●code events and methods, and
●move on to the next part of your application, all without leaving Visual Basic.
The Report Designer Component vs. Seagate Crystal Reports
If you have used Seagate Crystal Reports, you will notice several similarities between the Report Designer Component’s design window and the Seagate Crystal Reports Design Tab. However, there are some major differences to building reports inside Visual Basic with the Report Designer Component.
●Each section of the report is itself an object which has a Format event associated with it. When you double-click on any of the sections of the report, the Visual Basic code window opens displaying an event procedure for the Format event of that section. The Format event is invoked at runtime whenever the section is displayed and formatted.
●Because the Report Designer Component produces Visual Basic executable code, you can use Visual Basic for creating calculated fields and formulas in addition to using the built-in formula language.
●Your reports typically become an embedded part of the executable. This has implications for individuals who might want to later modify reports using standalone versions of Seagate Crystal Reports.
Despite these facts, you will find that you can quickly leverage your existing Seagate Crystal Reports knowledge to develop reports. While working with the Seagate Crystal Report Designer Component, though, keep in mind all of the following features.
The following topics are discussed in this section:
Data Access, Page 148
No drag and drop between reports – use copy and paste, Page 148
Conditional Formatting, Page 148
Preview Window, Page 149
Pictures, Page 149
Guidelines, Page 149
Subreports, Page 149
The dual formula environment, Page 150
Application Distribution, Page 151
The Report Designer Component |
147 |
Data Access
The Report Designer Component supports data access through Data Access Objects (DAO), Remote Data Objects (RDO), and ActiveX Data Objects (ADO). Through these three access methods, you can connect to most ISAM, ODBC, and SQL data sources available to Windows applications. In addition, you can create DAO Recordsets, RDO Resultsets, or ADO Recordsets in Visual Basic, then replace the data source used by a report at runtime by calling the SetDataSource method of the report Designer object model’s Report object.
The Report Designer Component also provides the ability to design reports based on Data Definition files, text files that define the fields and field types of a database without actually serving as a source of data. Using Data Definition files, you can design a report without depending on the existence of a database at design time, then dynamically create the data at runtime and assign it to the Report object of the Report Designer Component.
If you have installed the full Seagate Crystal Reports product, you also have the ability to use the Report Designer Component to connect to any data source that Seagate Crystal Reports can connect to. In such a case, the Report Designer Component implements the Seagate Crystal Reports user interface that you are already familiar with, so you can quickly connect to any existing data.
Finally, the Report Designer Component also supports Data Environments in Visual Studio 6.0. If your project includes a data environment, the Report Designer Component will allow you to select the data environment as a data source at design time. Runtime reports make full use of the data exposed by a data environment by working with the standard connection, command, or recordset objects provided, much like working directly with an ADO object.
For complete information on data access, refer to Working with data, Page 158.
No drag and drop between reports – use copy and paste
When you have multiple Report Designer Components open within the Visual Basic IDE, you cannot drag and drop objects, such as fields, text objects, subreports, lines and boxes, and formulas between reports. To move or copy objects between reports, use the standard Windows Cut, Copy, and Paste commands.
Conditional Formatting
Conditional formatting is created using formulas. With the Report Designer Component, you can produce conditional formatting results using all of the power of the Visual Basic language. If you have used Seagate Crystal Reports before, you may already be familiar with conditional formatting and the Seagate Crystal Reports formula language. The formula language is still available within the Report Designer Component, but you also have the option of making full use of the entire Visual Basic programming language. For more information on using Visual Basic to produce conditional formatting, refer to Designing Reports in the Visual Basic Integrated Development Environment.
The Report Designer Component |
148 |
Preview Window
Unlike Seagate Crystal Reports, the Report Designer Component does not have a Preview window or tab. Although you can use the methods of the Report object in the Report Designer object model to print or export a report, you must use the Seagate Crystal Smart Viewer for ActiveX to display reports on screen. The Smart Viewer is a standard ActiveX control that can be placed inside any development environment that supports ActiveX controls.
By passing in a Report object created using the Report Designer Component or its object model, you can easily display a report at runtime inside the Smart Viewer. The Smart Viewer window provides several controls and features that allow users to easily navigate and work with your reports. Additionally, the Smart Viewer, as an ActiveX control, can be programmed to create custom features and functionality specific to your application.
For complete information on using the Seagate Crystal Smart Viewer ActiveX control in a Visual Basic application, see Smart Viewer Object Model Programming.
Pictures
Images can now be dynamically displayed in a report at runtime using OLE objects. You may need to display images of products, corporate logos, employee pictures, or any other type of image in your report, but you may want to control which images are displayed based on variables that exist in your application only at runtime.
By adding OLE objects to your report, then changing the image at runtime using the FormattedImage property of the OLE object in the Report Designer object model, you can produce exciting, visually attractive reports for your users. For complete information working with OLE images, see Changing OLE object images.
Guidelines
Guidelines are not implemented in the Report Designer Component’s design window as they are in the Seagate Crystal Reports Design Tab. However, new alignment and sizing options have been added to eliminate much of the need for guidelines.
Subreports
Subreports are supported by the Report Designer Component, but they must be designed from within the main report. In Seagate Crystal Reports, you are able to create subreports from within the main report. You are also able to import existing report files as subreports. With the Report Designer Component, however, you are better off to create your subreports within the main report if you include Visual Basic code in your subreport.
●If you create a report in the Report Designer Component and use Visual Basic code in the report, any report calculations or formatting that you performed using that code are dependent on that code being in place. If you save such a report to a Crystal Report file (.rpt), you will lose all the embedded Visual
The Report Designer Component |
149 |
Basic code; the .rpt file format does not support it. (For more information, see Report Distribution Considerations.) If you later insert that report as a subreport using the Report Designer Component, the subreport will not perform as expected.
●If you create a subreport from within a main report in the Report Designer Component, all of the Visual Basic code used in the subreport will be stored as part of the executable. Thus, when you run the report, the subreport will perform as it should.
If you want to insert an existing report as a subreport in the Report Designer Component, make certain that you have used the Seagate Crystal Reports formula language for any calculations or conditional formatting in that report.
The dual formula environment
The Report Designer Component supports all of the same formula design capabilities that exist in Seagate Crystal Reports, including the complete Seagate Crystal Reports formula language. However, the Seagate Crystal Report Designer Component, as an ActiveX designer for use inside Visual Basic, also supports the Visual Basic language. By exposing much of its functionality through the Report Designer object model, the Report Designer Component allows you to create powerful functions and procedures that control not only the look of a report, but also the results displayed in a report. With this capability, you are able to leverage your experience with Visual Basic to do more sophisticated reporting. You’ll have:
●access to the robust functionality of Visual Basic,
●a familiar programming environment, and
●no need to learn an additional scripting language.
While you will still be able to use the Seagate Crystal Reports formula language, you won’t need to use it for your calculations and conversions.
On a high level, the way you create calculated fields in the Report Designer using Visual Basic is to:
●create a text object,
●enter the text object where you want the calculated value to appear,
●create a variable to capture the result of the Visual Basic calculation, and
●code the calculation.
Finally, you have the text object display the value in the variable via the SetText method.
You can also use Visual Basic code when implementing the Format event procedure of a section in the report. You can open a Format event procedure for a section by double-clicking the section in the Report Designer window or selecting the section and clicking the View Code button in the Visual Basic Project window.
The Report Designer Component |
150 |