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

Object Naming Conflicts

If your project includes other libraries that contain objects named identically to those found in the Crystal Report Engine Object Model, you will encounter conflicts unless you reference the objects by using a prefix. For example, if you have included the DAO Library with the Crystal Report Engine Object Model in your project, both libraries include a Database Object. In order to avoid conflicts, you must prefix the objects as follows:

CRPEAuto.Database

for the Crystal Report Engine Object Model, or

DAO.Database

for the DAO Library.

NOTE: You must always prefix when referencing the Font Object. Visual Basic includes a VB Font Object that is always included when creating a project, so conflicts will always occur unless the object is properly referenced.(For example, CRPEAuto.Font).

Object Model Events

Events are only available when using Visual Basic 5.0 or later. To use events, you must first declare the desired Object (Report or Window) as Public and With Events in the General, Declarations area of the module.

For example, declare the Report object as follows:

Public WithEvents reportVar As CRPEAuto.Report

The Visual Basic code screen will then list reportVar in the Object list, with events listed in the Procedure list. Adding code to an event will cause this code to be run whenever the event occurs, which in turn will be followed by the default behavior for the event. For complete information on handling events, see Handling Preview Window Events, Volume 1, Chapter 5.

Crystal Report Engine Object Model Reference

The rest of this chapter lists all objects in the Report Engine Object Model and describes their properties, methods, and events. Objects are listed in alphabetical order with a brief description and example of their use in Visual Basic code. A table follows each object description, listing all properties for the object, the purpose of each property, and whether the property is read only or both read and write. After each property table is a listing of object methods in alphabetical order. Finally, if an object supports events, the events are also listed in alphabetical order. Each method and event listing includes a complete description of its purpose and use inside Visual Basic. For more information on using the Report Engine Object Model in Visual Basic, see Crystal Report Engine Automation Server, Volume 1, Chapter 5.

Crystal Report Engine Object Model for the Automation Server

283

Objects and Collections

...including Properties, Methods, and Events

The following Objects and Collections are discussed in this section.

Objects and Collections are listed alphabetically; Properties, Methods and Events are grouped under the appropriate Object or Collection.

Application Object, Page 290

¾Application Object Properties, Page 291

¾Application Object Methods, Page 291

¾CanClose, Page 291

¾ClearError, Page 291

¾LogOffServer, Page 292

¾LogOnServer, Page 292

¾OpenReport, Page 293

Area Object, Page 294

¾Area Object Properties, Page 294 AreaOptions Object, Page 295

¾AreaOptions Properties, Page 295 Areas Collection, Page 296

¾Areas Collection Properties, Page 297 BlobFieldObject Object, Page 297

¾BlobFieldObject Object Properties, Page 297 BoxObject Object, Page 298

¾BoxObject Object Properties, Page 298 CrossTabObject Object, Page 299

¾CrossTabObject Object Properties, Page 299 Database Object, Page 299

¾Database Object Properties, Page 300

¾Database Object Methods, Page 300

¾ Verify, Page 300

Crystal Report Engine Object Model for the Automation Server

284

DatabaseFieldDefinition Object, Page 300

¾Database FieldDefinition Object Properties, Page 301 DatabaseFieldDefinitions Collection, Page 302

¾Database FieldDefinitions Collection Properties, Page 302 DatabaseParameter Object, Page 303

¾Database Parameter Object Properties, Page 303 DatabaseParameters Collection, Page 304

¾DatabaseParameters Collection Properties, Page 304 DatabaseTable Object, Page 305

¾DatabaseTable Object Properties, Page 305

¾DatabaseTable Object Methods, Page 306

¾GetPrivateData, Page 306

¾SetLogOnInfo, Page 307

¾SetPrivateData, Page 307

¾SetSessionInfo, Page 308

¾TestConnectivity, Page 309

DatabaseTables Collection, Page 309

¾DatabaseTables Collection Properties, Page 309 EventInfo Object (32-bit only), Page 310

¾EventInfo Object Properties, Page 310 ExportOptions Object, Page 310

¾ExportOptions Object Properties, Page 311

¾ExportOptions Object Methods, Page 314

¾PromptForExportOptions, Page 314

¾Reset, Page 314

FieldDefinitions Collection, Page 314

¾Database FieldDefinitions Collection Properties, Page 302 FieldObject Object, Page 315

¾Field Object Object Properties, Page 315

FieldValue Object (32-bit only), Page 316

¾ FieldValue Object Properties, Page 316

Crystal Report Engine Object Model for the Automation Server

285

Font Object, Page 316

¾Font Object Properties, Page 317 FormulaFieldDefinition Object, Page 318

¾FormulaFieldDefinition Properties, Page 318

¾FormulaFieldDefinition Methods, Page 320

¾Check, Page 320 FormulaFieldDefinitions Collection, Page 320

¾FormualFieldDefinitions Collection Properties, Page 321 GlobalOptions Object, Page 321

¾GlobalOptions Object Properties, Page 321 GraphObject Object, Page 322

¾GraphObject Object Properties, Page 322 GroupAreaOptions Object, Page 325

¾GraphAreaOptions Object Properties, Page 325 GroupNameFieldDefinition Object, Page 327

¾GroupNameFieldDefinition Object Properties, Page 327 LineObject Object, Page 329

¾LineObject Object Properties, Page 329

OLEObject Object, Page 329

¾OLEObject Object Properties, Page 330 Page Object (32-bit only), Page 330

¾Page Object Properties, Page 331

¾Page Object Methods, Page 331

¾RenderTotallerETF, Page 333

¾RenderTotallerHTML, Page 334 PageEngine Object (32-bit only), Page 332

¾PageEngine Object Properties, Page 333

¾PageEngine Object Methods, Page 333

¾CreatePageGenerator, Page 333

¾RenderTotallerETF, Page 333

¾RenderTotallerHTML, Page 334

Crystal Report Engine Object Model for the Automation Server

286

PageGenerator Object (32-bit only), Page 335

¾PageGenerator Object Properties, Page 335

¾PageGenerator Object Methods, Page 336

¾DrillOnGraph, Page 336

¾GetPageNumberForGroup, Page 336

¾SearchForText, Page 336

Pages Collection (32-bit only), Page 337

¾Pages Collection Properties, Page 337 PageSetup Object, Page 338

¾PageSetup Object Properties, Page 338 ParameterFieldDefinition Object, Page 340

¾ParameterFieldDefinition Object Properties, Page 340

¾ParameterFieldDefinition Object Methods, Page 342

¾SetCurrentValue, Page 342

¾SetDefaultValue, Page 343 ParameterFieldDefinitions Collection, Page 345

¾ParameterFieldDefinitions Collection Properties, Page 345 PrinterInfo Object, Page 345

¾PrinterInfo Object Properties, Page 346

PrintingStatus Object, Page 346

¾PrintingStatus Object Properties, Page 346 PrintWindowOptions Object, Page 347

¾PrintWindowOptions Object Properties, Page 348 Report Object, Page 349

¾Report Object Properties, Page 349

¾Report Object Methods, Page 351

¾AddGroup, Page 351

¾CancelPrinting, Page 352

¾ClearError, Page 352

¾Export, Page 352

¾Preview, Page 353

Crystal Report Engine Object Model for the Automation Server

287

¾PrintOut, Page 354

¾ReadRecords (32-bit only), Page 355

¾SelectPrinter, Page 355

¾Report Object Events, Page 355

¾ReadingRecords, Page 355

¾Start, Page 356

¾Stop, Page 357

ReportObjects Collection, Page 358

¾ReportObjects Collection Properties, Page 358 ReportOptions Object, Page 358

¾ReportOptions Object Properties, Page 359 ReportSummaryInfo Object, Page 360

¾ReportSummaryInfo Object Properties, Page 360 Section Object, Page 361

¾Section Object Properties, Page 361 SectionOptions Object, Page 361

¾SectionOptions Object Properties, Page 362 Sections Collection, Page 364

¾Sections Collection Properties, Page 364 SortField Object, Page 364

¾SortField Object Properties, Page 365

SortFields Collection, Page 365

¾SortFields Collection Properties, Page 365

¾SortFields Collection Methods, Page 366

¾Add, Page 366 SpecialVarFieldDefinition Object, Page 367

¾SpecialVarFieldDefinition Object Properties, Page 367 SubreportObject Object, Page 369

¾Subreport Object Properties, Page 369 SummaryFieldDefinition Object, Page 369

¾SummaryFieldDefinition Object Properties, Page 370

Crystal Report Engine Object Model for the Automation Server

288

SummaryFieldDefinitions Collection, Page 372

¾SummaryFieldDefinitions Collection Properties, Page 372 TextObject Object, Page 372

¾TextObject Object Properties, Page 373

TrackCursorInfo Object, Page 373

¾TrackCursorInfo Object Properties, Page 374 View Object, Page 375

¾View Object Properties, Page 376

¾View Object Methods, Page 376

¾Close, Page 376

¾Export, Page 376

¾NextMagnification, Page 377

¾PrintOut, Page 377

¾ShowFirstPage, Page 377

¾ShowLastPage, Page 377

¾ShowNextPage, Page 378

¾ShowNthPage, Page 378

¾ShowPreviousPage, Page 378

¾ZoomPreviewWindow, Page 378

Views Collection, Page 379

¾Views Collection Properties, Page 379 Window Object, Page 379

¾Window Object Properties, Page 380

¾Window Object Methods, Page 380

¾Close, Page 380

¾Window Object Events, Page 380

¾ActivatePrintWindow, Page 380

¾CancelButtonClicked, Page 381

¾CloseButtonClicked, Page 381

¾ClosePrintWindow, Page 382

¾DeactivatePrintWindow, Page 382

Crystal Report Engine Object Model for the Automation Server

289

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