Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
81
Добавлен:
11.05.2015
Размер:
2.11 Mб
Скачать

NOTE: When creating formatted reports for use with the bound data control in Visual Basic, you will not be able to refresh the data from within Seagate Crystal Reports since the data does not exist outside of the Visual Basic application.

NOTE: If you plan on using a formatted bound report, you will not be able to modify anything in the SELECT statement of the data control. The report needs all these fields and will fail if they are not all there. The formatted report can not report on any new fields.

When passing properties at runtime using bound reports (i.e., SortFields), the syntax is slightly different. For example, the following syntax would be used for the Formulas and SortFields properties in a normal report:

CrystalReport1.Formulas(0) = “COMMISSION= {TableName.FIELDNAME}”

CrystalReport1.SortFields(0) = “+{TableName.FIELDNAME}”

However, for a bound report, the following syntax would be used:

CrystalReport1.Formulas(0) = “COMMISSION= {Bound Control.FIELDNAME}”

CrystalReport1.SortFields(0) = “+{Bound Control.FIELDNAME}”

Sample Application

Seagate Crystal Reports includes a complete sample application written in Visual Basic 5.0 using the Crystal Report Engine Automation Server and the Microsoft Data Bound Grid control. The Xtreme Mountain Bike Inventory Application is a complete real-world application that provides various reports to employees at a fictitious company. The Microsoft Data Bound Grid control is used for an order-entry page that dynamic reports are produced from. The application is installed, by default, in the \Program Files\Seagate Software \Crystal Reports\sample\Xtreme\Invntory directory.

Visual Basic Solutions

143

Volume 1

 

6

The Report Designer Component

What you will find in this chapter...

The Seagate Crystal Report Designer Component - Introduction, Page 146

The Seagate Crystal Report Designer Component - Features, Page 146

The Report Designer Component vs. Seagate Crystal Reports, Page 147

...including comments regarding data access, copying between components, conditional formatting, application distribution, preview windows, pictures, guidelines, subreports, and the dual formula environment.

Installing the Report Designer Component, Page 151

...including system requirements and installation.

Using the Seagate Crystal Report Designer Component, Page 151

...including comments regarding adding the component to a project, selecting data, the Report Expert, adding Smart Viewer, running the application, and sample code.

Working with data, Page 158

...including comments regarding ADO, OLEDB, RDO, DAO, and connecting to those data sources; Data Environments, Data Definition Files; Report Templates; and ODBC, SQL, and PC data sources.

Report Designer Overview, Page 169

...including an introduction and comments regarding the Report Designer Component architecture at design time and runtime, and also the dual interface.

Report Designer Object Model Programming, Page 173

...a tutorial on the object model from the programming point of view.

Report Distribution Considerations, Page 190

...including comments regarding distributing and saving reports and data.

The Report Designer Component

145

The Seagate Crystal Report Designer Component -

Introduction

The Seagate Crystal Report Designer Component is an ActiveX designer that simplifies the process of adding powerful reporting features to applications designed with Visual Basic version 5.0 or later. With the Report Designer Component, you get all of the power of Seagate Crystal Reports right inside your Visual Basic projects. You create sophisticated reports without leaving the Visual Basic IDE.

While simply adding reports to Visual Basic applications has never been easier, the Report Designer Component also provides a complete object model. By working with the component objects, methods, properties, and events, you can design custom interfaces that provide users with the ability to control report data at runtime. The Report Designer Component gives you a simple design time interface with powerful runtime capabilities.

ActiveX designers

ActiveX designers provide a design environment inside of the Visual Basic Integrated Development Environment (IDE) for visual development of an application feature. An example is the Microsoft UserConnection designer that comes with Visual Basic. The UserConnection designer allows you to visually design ODBC database connections accessible from within your Visual Basic application. For more information on the UserConnection designer, refer to your Visual Basic documentation.

The Seagate Crystal Report Designer Component lets you visually add reporting functionality to your applications. The Report Designer window and the Create Report Expert provide the tools to visually design a report and implement it within your project at design time. The Report Designer object model provides a complete set of objects, properties, and methods to write code that manipulates your report and its data at runtime.

The Seagate Crystal Report Designer Component -

Features

The Report Designer Component makes it easy to create reports when using Visual Basic. There’s no need to open a different environment. You simply add the Report Designer Component to your project and use it to create reports from within the Visual Basic IDE.

The Report Designer Component is not a subset of a larger reporting tool. Nor is it a limited-function tool created to offer only minimal reporting capabilities. It is, instead, an ActiveX designer that holds virtually all of the power of the world’s most popular Windows report designer, Seagate Crystal Reports. And since it has been designed to work seamlessly within Visual Basic, while leveraging Visual Basic capabilities, reporting is easier to learn and easier to perform than ever before.

The Report Designer Component

146

Соседние файлы в папке crystal