Programming Ereports
Programming Ereports
Reports
Information in this document is subject to change without notice. Examples provided
are fictitious. No part of this document may be reproduced or transmitted in any
form, or by any means, electronic or mechanical, for any purpose, in whole or in part,
without the express written permission of Actuate Corporation.
© 1995 - 2003 by Actuate Corporation. All rights reserved. Printed in the United
States of America.
Contains information proprietary to:
Actuate Corporation
701 Gateway Boulevard
South San Francisco, CA 94080
http://www.actuate.com
The software described in this manual is provided by Actuate Corporation under an
Actuate License agreement. The software may be used only in accordance with the
terms of the agreement.
Actuate Corporation trademarks and registered trademarks:
Actuate, the Actuate logo, e.Analysis, e.Report, e.Reporting, e.Spreadsheet,
Formula One, Internet Spreadsheet, Live Report Document, ReportCast,
Report Encyclopedia, ReportingEngines, the ReportingEngines logo, Reportlet,
Spreadsheets Everywhere, Tidestone Technologies, and XML reports.
Third party trademarks or registered trademarks of their respective owners,
companies, or organizations:
Apache Software Foundation (http://www.apache.org/): Crimson, Tomcat, Xalan,
and Xerces. Apple Computer, Inc.: TrueType. BEA Systems, Inc.: BEA WebLogic
Server. Bits Per Second, Ltd. and Graphics Server Technologies, L.P.: Graphics Server.
Borland Software Corporation: JBuilder. Bristol Technology, Inc.: XPrinter. Bruno
Lowagie and Paulo Soares: iText, licensed under the Mozilla Public License (MPL).
Component One, LLC.: VSFlexGrid Pro. Fred L. Drake, Jr. (http://sourceforge.net/
projects/expat): Expat XML parser, created by James Clark, licensed under the MIT
License. Hewlett-Packard Company: HP-UX. IBM Corporation: 1-2-3 , AIX, DB2,
Informix-ESQL/C, ICU, Lotus, and WebSphere. Indiana University Extreme! Lab
(http://www.extreme.indiana.edu): XML Pull Parser and XPP. InstallShield
Corporation: InstallShield. InterNetivity Inc.: Databeacon. JDBM Project
(http://jdbm.sourceforge.net): JDBM. LEAD Technologies, Inc.: LEADTOOLS. Linus
Torvalds: Linux. Microsoft Corporation: ActiveX, Microsoft, MS-DOS, MSN,
Windows, Windows NT. Netscape Communications Corporation, Inc.: Netscape,
Netscape Communications, Netscape Communicator, Netscape Enterprise Server,
and Netscape Navigator. Oracle Corporation: Oracle Call Interface. Progress
Software Corporation: Progress. Quadralay Corporation: WebWorks. Rogue Wave
Software, Inc.: NobleNet RPC and Rogue Wave SourcePro. SAP AG: SAP.
Sun Microsystems, Inc.: 100% Pure Java, iPlanet, J2EE, Java and all Java-based marks,
JavaServer Pages, ONC, Solaris, SPARC, Sun, Sun Microsystems, and Sun ONE.
Sybase, Inc.: CT-Library. Symantec Corporation: Visual Cafe. Unicode, Inc.:
Unicode. World Wide Web Consortium (W3C): HTML Tidy and tidy.c. X/Open
Company, Ltd.: UNIX. Zero G Software, Inc.: InstallAnywhere. Zope Corporation:
Digital Creations and DCLC.
All other brand or product names are trademarks or registered trademarks of their
respective owners, companies or organizations.
Document No. 030430-2-130311 April 11, 2003
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxi
Understanding Actuate 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Addressing diverse customer profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Addressing customer requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Supporting international information delivery requirements . . . . . . . . . . . . . . . . . xxii
Providing a scalable, high performance server . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Providing a complete information delivery solution . . . . . . . . . . . . . . . . . . . . . xxiii
Introducing the Actuate 7 and ReportingEngines product suite . . . . . . . . . . . . . . . . xxiv
About Actuate e.Report Designer Professional product . . . . . . . . . . . . . . . . . . . . . xxvii
About Programming e.Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Online documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Using online manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Using online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Using context-sensitive online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Using the Actuate online help system. . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii
Using report-specific online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiv
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxv
Syntax conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxv
Part 1
Programming with the Actuate Foundation Classes
Chapter 1
Understanding the Actuate Foundation Classes . . . . . . . . . . . . . . 3
About the Actuate Foundation Class architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 4
About abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
About concrete classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Understanding the AFC by functional category . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About report object structure classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About connection classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About connection abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About connection concrete classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About data stream classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
About data stream abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
About data stream concrete classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
About report section classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
About report section abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . .10
i
About report section concrete classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
About page layout classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
About page layout abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
About page layout concrete classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
About control classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
About control abstract base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
About control concrete classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
About internal tool classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
About collection classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Chapter 2
Working with a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
About classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Declaring a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Understanding class relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
About inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
About scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Understanding class scope naming conventions . . . . . . . . . . . . . . . . . . . . . . . 22
About default class scope in a report design . . . . . . . . . . . . . . . . . . . . . . . . . 22
About the default scope of a class in a library . . . . . . . . . . . . . . . . . . . . . . . . 24
About class variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
About variables in Component Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
About visibility of variables in Component Editor . . . . . . . . . . . . . . . . . . . . . . . 25
Using property variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Using parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using regular variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
About methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Using methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
About methods you can override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
About methods you can call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
About private methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Overloading a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Chapter 3
Working with an object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
About objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Creating an object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Declaring an object reference variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Declaring an object reference variable as a specific class . . . . . . . . . . . . . . . . . . 35
Declaring an object reference variable as AnyClass type . . . . . . . . . . . . . . . . . . 36
Creating an object using New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Using an object reference variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Working with a simple variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ii
Working with an object reference variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Referencing an object’s variables and methods . . . . . . . . . . . . . . . . . . . . . . . . . .39
Referencing a method of a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
Referencing a method in a superclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
Using a class name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
Resolving an ambiguous method call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Assigning an object to an object reference variable . . . . . . . . . . . . . . . . . . . . . . . .42
Comparing Set and Let . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Setting an object reference variable to Nothing . . . . . . . . . . . . . . . . . . . . . . . .43
Passing an object reference to a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Getting information about an object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Testing an object reference with the Is operator . . . . . . . . . . . . . . . . . . . . . . . . . .44
Testing for Nothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Comparing object reference variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
About object lifetime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
About transient objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
About persistent objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
Chapter 4
Using Component Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
About Component Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Getting information about a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Viewing general information about a class . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Inspecting a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
Viewing and setting property values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Inspecting a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Working with a class variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Creating a class variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Editing a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
Deleting a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Overriding an inherited method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Overriding a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Working with a user-defined method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
Creating a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Naming a method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Editing a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60
Deleting a method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Chapter 5
Understanding document generation . . . . . . . . . . . . . . . . . . . . . . 63
Overview of the Factory service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
Starting the Factory service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
Adding startup and cleanup code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
iii
Starting the build process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Creating content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Using the core protocol for content creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Using a component reference in content creation . . . . . . . . . . . . . . . . . . . . . . . . 68
Using a report section to implement the content-creation protocol . . . . . . . . . . . . 69
Using a group section to implement the content-creation protocol . . . . . . . . . . . . 70
Using a frame to implement the content-creation protocol . . . . . . . . . . . . . . . . . 71
Using a control to implement the content-creation protocol . . . . . . . . . . . . . . . . 72
Creating a page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Determining the page on which to place a frame . . . . . . . . . . . . . . . . . . . . . . . . 73
Understanding the page list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Instantiating a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Working with a data stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
About data adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Combining data adapters to form a data stream . . . . . . . . . . . . . . . . . . . . . . . 76
About the protocol for a data adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Instantiating a data adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Sequential and random access to data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
About data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
About data filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
About data rows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Understanding the data row life cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Connecting to a database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Placing the connection in a data stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Placing a connection in a section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
About connection precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
About SQL support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Using statements and cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
About connection relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating and executing a custom SQL statement . . . . . . . . . . . . . . . . . . . . . . . . 86
Part 2
Customizing report designs
Chapter 6
Customizing a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Customizing a data stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Creating a computed data row variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Filtering out a selected data row. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Creating a select filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Creating a sort filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
iv
Retrieving data from a flat file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
Working with data from multiple sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
Customizing the report layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Conditionally creating a component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Dynamically embedding an image control . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Customizing report data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Conditionally setting properties of a control . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Creating a custom control to display a group section key . . . . . . . . . . . . . . . . . . . 108
Changing a control property based on another control’s value . . . . . . . . . . . . . . . . 110
Using GetControlValue( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Using the ObjectVariable property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Using FindContentByClass( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Using a global variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Chapter 7
Debugging a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
About debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Understanding the types of errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
About compilation errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Run-time errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Logic errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
About the Actuate Output window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Starting a debugging session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Controlling program execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Running to a breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Stepping through code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Resuming code execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Stopping code execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Examining variable values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Monitoring a variable as its value changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Interpreting the icons in the Variables window . . . . . . . . . . . . . . . . . . . . . . . . . 126
Tracing object reference variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Checking the value of a specific variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Viewing the stack of method calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Chapter 8
Designing a report with page-level security . . . . . . . . . . . . . . . . 131
About personal views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
About page-level security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
About the Security ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
About the Access Control List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
About the GrantExp property for a secure report . . . . . . . . . . . . . . . . . . . . . . . . 134
Viewing a report with page-level security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
v
Designing a report with page-level security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Testing a report design security example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Understanding the security scenario example . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Examining the report component for the security example . . . . . . . . . . . . . . . . . . 142
Reviewing the query for the security example. . . . . . . . . . . . . . . . . . . . . . . . . . 142
Examining the GrantExp property for the security example . . . . . . . . . . . . . . . . . . 143
Examining the page layout for the security example . . . . . . . . . . . . . . . . . . . . . . 144
Examining the report security example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Testing a security requirement example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Examining the report design and GrantExp property . . . . . . . . . . . . . . . . . . . . . 149
Customizing the Security ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Using GetUserACL( ) to create a Security ID . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Customizing the Access Control List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Using the CascadeSecurity property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Using the GetFullACL( ) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Using the SetSecurity( ) method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
About the secure read privilege. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Chapter 9
Programming for report viewing events . . . . . . . . . . . . . . . . . . . 155
About report viewing events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Objects that respond to report viewing events. . . . . . . . . . . . . . . . . . . . . . . . . . 156
Mouse events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Responding to mouse events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
About the Shift value in mouse event methods . . . . . . . . . . . . . . . . . . . . . . . 158
Using the Shift value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Creating a context menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
About default context menu items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
About the Default Action context menu item. . . . . . . . . . . . . . . . . . . . . . . . . 160
About the Help context menu item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
About the Copy Link context menu item . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Customizing context menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Providing help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Providing balloon help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Providing context-sensitive help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Chapter 10
Using and customizing a stored procedure . . . . . . . . . . . . . . . . 167
About stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
About stored procedure result sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Using stored procedure tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Designing a report with stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
vi
Working with stored procedures dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Working with data from a stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Synchronizing the stored procedure design . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Narrowing a search and matching patterns in stored procedures. . . . . . . . . . . . . . . 177
Working with sample values for input parameters . . . . . . . . . . . . . . . . . . . . . . . . 179
About input and output parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
About Oracle8 and Oracle9i stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . 182
About stored functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Using the Stored Procedure Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Overriding the OpenCursor method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Understanding the data retrieval example. . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
About the EMP table in the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
About the stored function in the example . . . . . . . . . . . . . . . . . . . . . . . . . . 184
About the Stored Procedure Data Source Builder in the example . . . . . . . . . . . . . 186
About parameters in the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
About the Requester in the example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
About the report in the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Customizing a stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Accessing a stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Working with a Sybase stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Working with an Oracle stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Working with a stored procedure’s return value. . . . . . . . . . . . . . . . . . . . . . . 192
Working with a stored procedure to return an ID . . . . . . . . . . . . . . . . . . . . . . 192
Accessing Sybase SQL Server multiple result sets . . . . . . . . . . . . . . . . . . . . . . . 193
Accessing Oracle8 and Oracle9i stored procedure multiple result sets . . . . . . . . . . . . 194
Adding support in Actuate Basic methods . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Mapping Actuate variable types and Visual Basic type codes . . . . . . . . . . . . . . . . . 198
Chapter 11
Writing custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
About custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
About the browser scripting control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Including custom browser code in a report design . . . . . . . . . . . . . . . . . . . . . . . 205
About the context block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Clipping the output of custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Aligning the output of custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Debugging custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Including global custom browser code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Creating an HTML form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Generating custom browser code dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Overriding BrowserCode( ) and GetText( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Determining the application execution context . . . . . . . . . . . . . . . . . . . . . . . 211
Generating output for different browsers. . . . . . . . . . . . . . . . . . . . . . . . . . . 211
vii
Adjusting for the current scaling factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Overriding the BuildFromRow( ) and OnRow( ) methods . . . . . . . . . . . . . . . . . . . 212
Printing and viewing a report using the PDF converter . . . . . . . . . . . . . . . . . . . . . . 213
Displaying different controls in DHTML and PDF output . . . . . . . . . . . . . . . . . . . 214
ShowWhenPrinting and ShowWhenViewing . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Printing and viewing a report using the Actuate Viewer . . . . . . . . . . . . . . . . . . . . . 214
Creating an example library for Internet Explorer . . . . . . . . . . . . . . . . . . . . . . . . . 215
Using DHTMLForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Working with DHTMLForm variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Working with DHTMLForm methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Subclassing DHTMLForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Working with DHTMLMenuControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Working with DHTMLMenuControl variables . . . . . . . . . . . . . . . . . . . . . . . . 218
Working with DHTMLMenuControl methods . . . . . . . . . . . . . . . . . . . . . . . . 218
Subclassing DHTMLMenuControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Displaying custom browser code in the Viewer . . . . . . . . . . . . . . . . . . . . . . . 221
Displaying custom browser code output in a web browser . . . . . . . . . . . . . . . . . 222
Creating a report for viewing in Netscape. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Chapter 12
Designing a report for XML data. . . . . . . . . . . . . . . . . . . . . . . . . . 225
About the XML data format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
About Document Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Examining a simple XML document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
About the View process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Publishing an Actuate report as XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Mapping XML to Actuate report sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
About XML properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
About AcReport XML properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
About AcReportComponent XML properties . . . . . . . . . . . . . . . . . . . . . . . . 232
About AFC XML functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Chapter 13
Understanding report bursting techniques . . . . . . . . . . . . . . . . . 237
About report bursting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Understanding report bursting techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Understanding report bursting tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Examining report bursting examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Examining a subreport bursting example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Examining the report structure for a subreport bursting example . . . . . . . . . . . . . 241
Examining the detail report’s PageList component for a subreport bursting example. . 241
Examining the detail query for a subreport bursting example . . . . . . . . . . . . . . . 242
viii
Examining the BuildFromRow( ) method for a subreport bursting example . . . . . . . 242
Examining the SuggestRoiName( ) method for a subreport bursting example . . . . . . 243
Examining the summary entry’s LinkExp property for a subreport bursting example . 243
Examining a group bursting example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Examining the report structure for a group bursting example . . . . . . . . . . . . . . . 244
Examining the detail report’s PageList component for a group bursting example. . . . 245
Examining the SuggestRoiName( ) method for a group bursting example . . . . . . . . 245
Examining the summary entry’s LinkExp property for a group bursting example . . . 245
Part 3
Programming with Actuate Basic
Chapter 14
Introducing Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
About Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Programming with Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Understanding code elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
About statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
About expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
About operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using an arithmetic operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Using a comparison operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Working with logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Using the concatenation operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
About operator precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Adhering to coding conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Commenting code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Breaking up a long statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Placing short, related statements on a single line . . . . . . . . . . . . . . . . . . . . . . . . 257
Indenting code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Using a consistent naming and style convention . . . . . . . . . . . . . . . . . . . . . . . . 257
About naming rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Using the code examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Chapter 15
Understanding variables and data types. . . . . . . . . . . . . . . . . . . 259
About variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Declaring a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
About global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Using a local variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
About class variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
ix
Declaring an array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
About multi-dimensional arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
About dynamic arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Changing the size of an array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
About data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Using standard data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Using an AFC data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Assigning a data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Using the As keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Using a type-declaration character. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
About constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Working with variant data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Working with string data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Declaring a string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Using binary string data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Manipulating a string. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Formatting strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Comparing strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Changing capitalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Removing spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Embedding a quote in a string. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Working with numeric data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
About numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
About currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Using numeric data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Working with date data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Using Date display formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Formatting date and time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Working with a user-defined data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Using an alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Using a structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Using a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Working with a CPointer data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Converting a data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Chapter 16
Writing and using a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
About procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
About scope in procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
About methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Creating a global procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Declaring a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
x
Declaring a Sub procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Declaring a Function procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Declaring an argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
About argument data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Passing an argument by reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Passing an argument by value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Calling a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Calling a Sub procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Calling a Function procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Overloading a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Using a control structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Using If...Then. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Using If...Then...Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Using Do...Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Using For...Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Using a nested control structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Exiting a control structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Exiting a Sub or Function procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Part 4
Programming in the Windows environment
Chapter 17
Using an object from another application. . . . . . . . . . . . . . . . . . 291
Adding an object from another application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
About object linking and embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
About supported OLE objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
About OLE custom controls (OCX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Understanding linking and embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Working with a linked object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Working with an embedded object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Guidelines for linking and embedding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Linking and embedding an OLE object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Editing an OLE object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Inserting an OLE custom control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Moving and sizing an OLE component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Subclassing an OLE component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
xi
Chapter 18
Programming an object from another application . . . . . . . . . . . 303
About programming other applications’ objects . . . . . . . . . . . . . . . . . . . . . . . . . . 304
About OLE Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Differentiating an OLE Automation object from another OLE object . . . . . . . . . . . . . 304
Determining which OLE Automation objects an application supports . . . . . . . . . . . . 304
Creating an OLE Automation object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Working with an OLE Automation object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Using an OLE Automation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Chapter 19
Calling an external function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Calling an external C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Using a C function with Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Declaring a C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Declaring the C function as a Sub procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Declaring the C function as a Function procedure . . . . . . . . . . . . . . . . . . . . . . . 311
Understanding C function declaration issues . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Specifying the library of a C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Passing an argument by value or reference . . . . . . . . . . . . . . . . . . . . . . . . . . 312
About flexible argument types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Aliasing a non-standard C function name . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Determining an Actuate Basic argument type . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Calling a C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Calling a C function with a specific data type . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Passing a string to a C function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Passing an array to a C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Passing a null pointer to C function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Passing a user-defined data type to a C function . . . . . . . . . . . . . . . . . . . . . . . 316
Passing an object reference variable to a C function . . . . . . . . . . . . . . . . . . . . . 316
About return values from C functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Working with a Java object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
About Java requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Creating a Java object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Invoking a method and accessing a field on a Java object . . . . . . . . . . . . . . . . . . . 317
Invoking a static method and accessing a static field . . . . . . . . . . . . . . . . . . . . . . 318
Converting a Java data type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Converting a Java String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Converting a Java null . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Converting an array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
About Java exception and error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Debugging a Java object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
xii
Part 5
Programming with Actuate’s C++ APIs
Chapter 20
Using Actuate’s application programming interfaces . . . . . . . . 325
About the programming interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
About the Report Server API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
About the Requester API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
About the search extension API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
About the Actuate ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
A comparison of API features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Choosing the appropriate API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
When to use the Report Server API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
When to use the Requester API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
When to use the search extension API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
When to use Actuate ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Chapter 21
Requester API user guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
About the Requester API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Understanding the Requester API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Working in the client-server environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Working locally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Using the Requester API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
About the Requester API development environment . . . . . . . . . . . . . . . . . . . . . 337
Identifying the APIs to your application . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Selecting a compiler and other tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Choosing API files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Choosing a DLL file for the Windows environment . . . . . . . . . . . . . . . . . . . . . 339
Working with UNIX libraries and path variables . . . . . . . . . . . . . . . . . . . . . . 340
About the Requester API operating environment. . . . . . . . . . . . . . . . . . . . . . . . 340
Using the Requester API with the Actuate Viewer . . . . . . . . . . . . . . . . . . . . . 341
Understanding API functions by programming tasks . . . . . . . . . . . . . . . . . . . . . . . 341
Writing startup and cleanup code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Working with report files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Specifying a local file name—Requester API . . . . . . . . . . . . . . . . . . . . . . . . . 343
Specifying an iServer file name—Requester API. . . . . . . . . . . . . . . . . . . . . . . 343
Getting the parameter and parameter group names . . . . . . . . . . . . . . . . . . . . . . 344
Getting the parameter attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Getting the default parameter values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
xiii
Getting the current parameter values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Setting parameter values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Configuring a printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Running, viewing, and printing reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Running a report locally. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Checking for errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Functions with direct error checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Functions that do not support error checking . . . . . . . . . . . . . . . . . . . . . . . . 350
Writing a Requester API application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Writing an application that uses iServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Initializing an API session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Connecting to iServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Specifying parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Running and viewing the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Printing the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Closing the API session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Writing an application for local reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Declaring a Visual Basic method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Initializing an API session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Specifying parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Generating a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Viewing a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Printing a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Closing a session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Processing a report request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Using the Requester API in Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Generating a report in Actuate Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Using the Requester API in Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Accessing the Requester API from Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . 360
Specifying the DLL in the Declare statement . . . . . . . . . . . . . . . . . . . . . . . . . 360
Manipulating parameter values, generating and printing a report . . . . . . . . . . . . . . 361
Creating a custom dialog for requesting parameter values. . . . . . . . . . . . . . . . . . . 366
Using the Requester in a C++ application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Working with a BSTR in the Windows environment . . . . . . . . . . . . . . . . . . . . . . 368
Working with BSTRs in C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Chapter 22
Requester API reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
AcReqCloseFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
AcReqConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
AcReqDisconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
AcReqGenerateReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
xiv
AcReqGetAdhoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
AcReqGetAlias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
AcReqGetDefaultValueCurrency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
AcReqGetDefaultValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
AcReqGetDefaultValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
AcReqGetDefaultValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
AcReqGetDefaultValueStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
AcReqGetDefaultValueString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
AcReqGetError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
AcReqGetErrorString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
AcReqGetFirstGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
AcReqGetFirstParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
AcReqGetHidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
AcReqGetHideText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
AcReqGetNextGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
AcReqGetNextParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
AcReqGetParmType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
AcReqGetReportVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
AcReqGetRequired . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
AcReqGetType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
AcReqGetValueCurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
AcReqGetValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
AcReqGetValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
AcReqGetValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
AcReqGetValueStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
AcReqGetValueString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
AcReqGetVersionNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
AcReqHasDefaultValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
AcReqInitialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
AcReqPrintReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
AcReqReadFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
AcReqReportStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
AcReqSelectClient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
AcReqSetDefaultPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
AcReqSetEUDTPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
AcReqSetPrinterCollate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
AcReqSetPrinterColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
AcReqSetPrinterDuplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
AcReqSetPrinterFormName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
AcReqSetPrinterName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
AcReqSetPrinterNumberCopies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
AcReqSetPrinterOrientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
AcReqSetPrinterPaperSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
xv
AcReqSetPrinterScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
AcReqSetPrinterTray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
AcReqSetRequestPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
AcReqSetScopedParameterName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
AcReqSetValueCurrency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
AcReqSetValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
AcReqSetValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
AcReqSetValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
AcReqSetValueString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
AcReqUnInitialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
AcReqViewReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
AcReqWriteFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
AcWReqConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
AcWReqGenerateReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
AcWReqGetAdhoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
AcWReqGetAlias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
AcWReqGetDefaultValueCurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
AcWReqGetDefaultValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
AcWReqGetDefaultValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
AcWReqGetDefaultValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
AcWReqGetDefaultValueStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
AcWReqGetDefaultValueString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
AcWReqGetErrorString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
AcWReqGetFirstGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
AcWReqGetFirstParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
AcWReqGetHidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
AcWReqGetHideText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
AcWReqGetNextGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
AcWReqGetNextParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
AcWReqGetParmType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
AcWReqGetRequired . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
AcWReqGetValueCurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
AcWReqGetValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
AcWReqGetValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
AcWReqGetValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
AcWReqGetValueStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
AcWReqGetValueString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
AcWReqGetVersionNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
AcWReqHasDefaultValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
AcWReqPrintReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
AcWReqReadFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
AcWReqSetEUDTPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
AcWReqSetPrinterName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
xvi
AcWReqSetValueCurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
AcWReqSetValueDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
AcWReqSetValueDouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
AcWReqSetValueInteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
AcWReqSetValueString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
AcWReqViewReport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
AcWReqWriteFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Undocumented functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Chapter 23
Search extension API user guide. . . . . . . . . . . . . . . . . . . . . . . . . 461
About the search extension API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Search extension API functions by programming task . . . . . . . . . . . . . . . . . . . . . . 462
Writing startup and cleanup code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Setting search parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Processing search results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Developing a search extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Writing search extension code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Creating a definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Creating a header file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Compiling the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Installing a custom search extension. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Chapter 24
Search extension API reference. . . . . . . . . . . . . . . . . . . . . . . . . . 467
Close. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
GetColumnDelimiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
GetName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
GetParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
IncludeHeader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
InputParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
PutRow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
SetDataTypeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
SetParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Chapter 25
Actuate ActiveX controls user guide. . . . . . . . . . . . . . . . . . . . . . 473
About Actuate’s ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Features of ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Adding the Actuate ActiveX controls to your application . . . . . . . . . . . . . . . . . . . 474
Adding the Actuate ActiveX controls to Visual Basic. . . . . . . . . . . . . . . . . . . . . . 474
xvii
Adding the Actuate ActiveX controls to C or C++ . . . . . . . . . . . . . . . . . . . . . . . 475
Using ActiveX controls embedded in dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . 475
About report files and the Actuate ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . 476
Specifying local file names for Actuate reports . . . . . . . . . . . . . . . . . . . . . . . . . 476
Specifying iServer file names for Actuate reports . . . . . . . . . . . . . . . . . . . . . . . . 476
Actuate ActiveX methods by programming task . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Opening and closing a report instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Navigating and viewing the report instance . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
Running a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Printing, mailing, and saving a report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Invoking functions in an open report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Handling error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Visual Basic example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Building the sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Visual Basic code segment descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Running the sample application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Installing Actuate ActiveX controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Choosing API files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
API file name conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
API file versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Chapter 26
Actuate ActiveX controls reference . . . . . . . . . . . . . . . . . . . . . . . 491
AboutBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
BackDisable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
BackEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
BundleReportInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
CallBasicFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
CancelReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
CanRunReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
CloseReportExecutable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
CloseReportInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
ConnectToServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
CurrentPage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
FirstPage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
GetLastError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
GetMostRecentListCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
GetMostRecentListItemAt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
GetStatusCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
GetStatusMessageAt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
GoToPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
xviii
LastPage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
LoadResource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
MailReportInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
NextPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
OpenRecentReportInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
OpenReportExecutable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
OpenReportInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
PageCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
PreviousPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
PrintReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
ResetStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
RunReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
RunReportWithParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
SaveAsXMLData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
SearchWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
SetScaleFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
SetWindowLayout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
TableOfContents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
xix
xx
Intro ductio n
Understanding Actuate 7
Actuate® is the leading provider of information application platform solutions
for Global 9000 companies and packaged application software vendors. This
release addresses two key needs presented by our customers:
■ Controlled empowerment of their users
■ Leveraging existing assets
In the current business climate, our customers need to reconcile reduced
staffing and the ever-present IT backlog with the demand for increasingly
complex and customized information.
Empowering the business user as a way to reduce IT backlog has always been
an appealing solution. In this time of reduced staffing and project funding, the
business user can then leverage information the IT staff develops to meet his
additional, and perhaps unique, needs. At the same time, today’s information
manager needs increased visibility into what his business users are doing with
the information he provides because of internal requirement for greater
accountability. For example, new SEC regulations add to the demand on the
corporate information management infrastructure.
Actuate technology ensures that users have business agility: access to the right
information in the right form to take the right action. Actuate customers also
need tools that ensure IT organizations maintain the appropriate level of
control over the corporate information assets. To meet these requirements,
Actuate’s information application platform includes three key elements:
■ An information server
■ An information application development environment
■ User empowerment tools
Introduction xxi
Addressing diverse customer profiles
Actuate’s customer list continues to include leaders in aerospace, commercial
banking, defense, entertainment, federal government, financial services,
health care, high technology, insurance, life sciences, pharmaceuticals, retail,
securities, and telecommunications.
Our infrastructure software provides the foundation for applications that
support business analysis, customer relationship management, customized
interactive reporting, e.billing, e.procurement, executive dashboards, human
resources, information portals, key performance indicators, service
automation, spreadsheet reporting, supply chain management, and systems
management. In the e.Business environment, our structured content
technology seamlessly integrates into corporate web sites and packaged
applications.
Introduction xxiii
Challenge Actuate solution
Meet varied information display Provide:
requirements. ■ Template-based design and
display.
■ Complex formatting capabilities.
■ Spreadsheet reporting.
Meet exploding requirements for Support well over one million hits a
web-based content delivery. day on a single CPU.
Deliver personalized, secure Provide open security directory
information. integration and page-level security.
Reuse existing integrated content. Provide access to content from other
applications using open server
technology.
Maintain data integrity between Provide high-resolution printed copy
online and hard copy. from PostScript and PDF.
Transfer information among Provide XML output to support
applications. access to data across applications.
Meet increasing requirements for Support clustering and failover.
server-based reporting
Introduction xxv
■ Actuate Information Delivery API integrates Actuate web services into
existing corporate applications, automates routine or time-consuming
iServer integration tasks, and implements new feature groupings for
custom business processes. The Actuate Information Delivery API is
based on XML and supports the SOAP messaging protocol.
■ Actuate Report Server Security Extension supports the use of third-
party security tools.
■ The Actuate archive driver supports the use of third-party archiving
software and hardware.
■ Actuate Report Server API implements common Encyclopedia volume
functionality using C++.
Actuate 7 supports the following iServer options:
■ Actuate e.Analysis Option
An application used to transform data from an Actuate report into
interactive information. Users can view and analyze data to determine
relationships and trends.
■ Actuate e.Report Option
A Basic and Java option that provides Encyclopedia volume functionality
for e.Report Designer, e.Report Designer Professional, and Formula One
e.Report Designer.
■ Actuate e.Spreadsheet Option
An open server application that generates Excel spreadsheets from
e.Spreadsheet Designer files. Using this product, customers manage
spreadsheet reports and analysis within the Actuate iServer and save
Actuate reports as richly formatted Excel spreadsheets.
■ Actuate Query Option
A web-based tool that supports ad hoc queries based on predefined data
streams.
■ Multi-Application Option
An option that supports using more than one Encyclopedia volume in the
Actuate iServer System.
■ Page Level Security Option
An option that supports personalizing viewing privileges at the user level
for reports and parts of reports.
■ Progress Option
A server application that supports working exclusively with Progress
databases to generate Live Report Documents, manage them in the
Encyclopedia volume, and make them available to users.
Actuate Viewer
An application end users can use to find, view, and print report documents.
Introduction xxvii
only to customers, telephone Actuate Customer Support. The engineers in
Actuate Customer Support can also help you with technical questions about
the product according to your service contract. The Customer Support
telephone number and e-mail information can be found among the printed
materials in the product box.
The Example folder in the product directory contains report examples. Each
sample report folder contains a variety of files, often including a text file that
discusses how the example works. In addition, Client Integration Technology
includes sample applications. The samples demonstrate how to use the APIs.
The printed and online documentation includes the following manuals.
Terminology map
Glossary
Actuate 7
Glossary
Introduction xxix
Programming e.Reports includes the following chapters.
■ Introduction. This chapter provides an overview of this guide, the Actuate
e.Report Designer Professional documentation, and the typographical
conventions used.
■ Chapter 1. Understanding the Actuate Foundation Classes. This chapter
explains the architecture of the Actuate foundation class library, and
provides an overview of classes by category.
■ Chapter 2. Working with a class. This chapter explains what classes are and
how to use them.
■ Chapter 3. Working with an object. This chapter explains what objects are and
how to work with them.
■ Chapter 4. Using Component Editor. This chapter describes how to use
Component Editor to modify classes.
■ Chapter 5. Understanding document generation. This chapter explains how the
Factory builds Actuate reports and document object instance (.doi) files. It
also describes the class protocols that determine how objects in a document
fit together.
■ Chapter 6. Customizing a report. This chapter shows several examples of
customizing reports through code.
■ Chapter 7. Debugging a report. This chapter describes the features of the
Actuate debugger.
■ Chapter 8. Designing a report with page-level security. This chapter describes
how to create a report design that generates different reports depending on
the report user.
■ Chapter 9. Programming for report viewing events. This chapter describes the
Viewer events you can control and provides examples.
■ Chapter 10. Using and customizing a stored procedure. This chapter describes
how to create and call stored procedures.
■ Chapter 11. Writing custom browser code. This chapter describes how to
include custom browser code such as HTML in a report design.
■ Chapter 12. Designing a report for XML data. This chapter describes how to
design an XML report.
■ Chapter 13. Understanding report bursting techniques. This chapter describes
different ways to implement report bursting.
■ Chapter 14. Introducing Actuate Basic. This chapter provides an overview of
the Actuate Basic language, the basic code elements, and coding
conventions.
Introduction xxxi
Online documentation
The information in the printed manuals is also available as Adobe Acrobat
PDF files and in the online help system for Actuate products. For products
without a Windows interface, such as Actuate iServer System, we provide
HTML help files. You can view these files using a standard web browser.
Introduction xxxiii
The following illustration shows the result of a search as it appears in the left
pane. To view the topic in the right pane, double-click the topic in the list. The
topic appears in the right pane.
Choose Search
Type the keyword for which to search
Syntax conventions
The following table describes the symbols used to present syntax.
Introduction xxxv
Symbol Description Example
{} Groups two or more {While | Until}
mutually exclusive
options or arguments,
when used with a pipe
Defines array contents {0, 1, 2, 3}
Delimiter of code block public ACJDesigner( )
{
}
Understanding the
Chapter 1
Actuate Foundation
Classes
This chapter contains the following topics:
■ About the Actuate Foundation Class architecture
■ Understanding the AFC by functional category
4 Programming e.Repor ts
AcComponent
AcConnection AcDataRow
AcDataAdapter AcReportComponent
6 Programming e.Repor ts
Understanding the AFC by functional category
The following functional categories describe the Actuate Foundation Classes:
■ Report object structure classes
■ Connection classes
■ Data stream classes
■ Section classes
■ Page layout classes
■ Control classes
■ Internal tools classes
■ Collection classes
The following sections provide an overview of the Actuate Foundation
Classes, their purpose, and their position in the class hierarchy. For detailed
information about each class, see Chapter 3, “AFC classes,” in Actuate
Foundation Class Reference.
AcReportComponent
Classes in this category form the backbone of a report. They define the general
structural characteristics of objects, how to create them, and how they fit
together. Typically, you do not derive from these classes. When you create a
report in e.Report Designer Professional, you derive a report class from
AcReport. The report is the container for all other objects in a report.
AcDBConnection
AcDB2Connection
AcInformixConnection
AcMSSQLConnection
AcODBCConnection
AcOracleConnection
AcProgressConnection
AcProgressSQL92Connection
AcSAPConnection
AcSAPConnecti
AcSybaseConnection
AcSybaseDBLibConnection
8 Programming e.Repor ts
AcDBStatement and AcDBCursor provide the Actuate Basic interface for
working with SQL statements and cursors. The AFC framework creates and
uses instances of these classes when your report accesses a SQL database.
AcDataRow
AcDataAdapter
AcDataSource
AcDatabaseSource
AcQuerySource
AcTextQuerySource
AcSQLQuerySource
AcStoredProcedureSource
AcDataFilter
AcSingleInputFilter
AcMemoryBuffer
AcRecordBuffer
AcMemoryDataSorter
AcMultipleInputFilter
Classes in this category get and process data, create data rows, and send data
rows to the report.
AcSection
AcDataSection
AcReportSection
AcGroupSection
AcSequentialSection
AcConditionalSection
AcParallelSection
Classes in this category manage the data from data streams and build report
sections and frames that contain the data. Objects of these classes are non-
visual objects that form the report’s structure.
10 Programming e.Repor ts
About page layout classes
AcComponent
AcReportComponent
AcVisualComponent
AcBaseFrame
AcBasePage
AcSubPage
AcPage
AcDataFrame
AcFrame
AcFlow
AcLinearFlow
AcTopDownFlow
AcPageList
AcSimplePageList
AcLeftRightPageList
AcTitleBodyPageList
Classes in this category manage the creation and display of report pages.
12 Programming e.Repor ts
About control classes
AcVisualComponent
AcCrosstab
AcControl
AcLabelControl
AcTextualControl
AcBrowserScriptingControl
AcDataControl
AcTextControl
AcDynamicTextControl
AcIntegerControl
AcDoubleControl
AcCurrencyControl
AcDateTimeControl
AcImageControl
AcLineControl
AcRectangleControl
AcEllipseControl
AcOLEControl
AcOLEContainerControl
AcChart
AcSummaryChart
AcDetailChart
AcHLCChart
AcPageNumberControl
Classes in this category include data controls, crosstabs, charts, and static
graphical objects.
AcXMLDataVisitor
AcOrderedCollection AcSingleListIterator
AcList
AcSingleList
AcObjectArray
AcBTree
14 Programming e.Repor ts
Classes in this category define the way Actuate products store objects and
access them in a linked list. For example, frames use lists to manage the
controls within them. To work with report content in a list, such as controls in
a frame or flows on a page, create a collection class and an iterator class to
access the contents.
Declaring a class
Actuate Basic code defines the structure and behavior of the Actuate
Foundation Classes. The user interface of e.Report Designer Professional
creates the necessary Actuate Basic code for the classes that correspond to
components of a report design. To write a custom class for a report design,
declare the class with the Class statement and instantiate it as an object using
techniques described in “Creating an object,” in Chapter 3, “Working with an
object.”
The Class statement uses the following syntax:
Class <subclass name> Subclass Of <superclass name>
[<variable declarations>]
[<nested class declarations>]
[<method declarations>]
End Class
The body of a class declaration consists of the following optional items:
18 Programming e.Repor ts
■ Variable declarations, which declare variables associated with the class
■ Class declarations for classes nested in the current class
■ Method declarations, which consist of procedures and functions associated
with the class
The following example shows class declaration code in an Actuate Basic
source (.bas) file, which Actuate e.Report Designer Professional generates
when you compile a report object design (.rod) file. This example creates
ItemFrame as a subclass of AcFrame, declares four variables for the subclass,
and defines procedures and functions for the subclass:
Class ItemFrame Subclass Of AcFrame
' Variable declarations
Dim AlternateColor As AcColor
Dim AlternateLines As Integer
Static OriginalColor As AcColor
Static RowNumber As Integer
' Class declarations for nested classes
Class ItemCode Subclass Of AcTextControl
...
End Class
' Methods
Sub SetProperties( )
Super::SetProperties( )
AlternateColor = 15527148
AlternateLines = 2
BackgroundColor = 14408667
Size.Height = 12703
Size.Width = 400
End Sub
Sub OnStart( )
Super::OnStart( )
OriginalColor = BackgroundColor
RowNumber = RowNumber + 1
If RowNumber > AlternateLines * 2 Then
RowNumber = 1
End If
IF RowNumber > AlternateLines Then
BackgroundColor = AlternateColor
End If
End Sub
...
End Class
Relationship Description
Inheritance When one class derives another, the derived class,
or subclass, inherits variables and methods from
the base class, or superclass.
Scope Scope defines a relationship in which the
declaration of one class is nested within another
class declaration. Scope determines the visibility
of classes, static variables, and methods and how
you refer to those items in code.
Reference A reference supports accessing an object directly
from another object. When ObjectA of Class A
refers to ObjectB of ClassB in code, ObjectA has
access to the public components of ObjectB, such
as its methods and variables. A reference is not a
subclass or a new instance of another class.
About inheritance
In the AFC class hierarchy, inheritance supports a standard interface for report
applications. It also supports code reusability. The classes at the top of the
hierarchy typically contain empty method declarations or methods with a few
lines of general instructions. These methods enforce a protocol for creating a
report using Actuate e.Report Designer Professional. A subclass redefines a
higher method by adding implementation details. When you derive a class
from an Actuate Foundation Class, the subclass inherits the protocol.
For more information about inheritance, see Chapter 2, “Understanding the
design process,” in Developing Advanced e.Reports.
20 Programming e.Repor ts
About scope
Scope is the part of an application in which a symbol exists or is visible. A
symbol is the name of an item such as a class, a method, a variable, or a
constant. Scope determines how you access or reference a class, when to
instantiate a class, when to initialize a variable, and so on.
You can declare a class in either global or class scope. A class has global scope
if you do not declare it within another class. A class has class scope if you
declare it within another class. A class with class scope is called a nested class.
For example, a control in a frame usually is a nested class, scoped to the frame
that contains the control. You cannot move the base class into the scope of a
nested class.
In the following illustration of a report design, SalesDetail is a subclass of
AcReport and has global scope, as the Class page of Sales Detail—Component
Editor shows. SalesDetailReport is a nested class of SalesDetail and has class
scope because it is declared within SalesDetail.
The following code example also shows the scope and inheritance of
SalesDetail. In addition, it shows two nested classes, OfficeTitleFrame and
CustomerTitleFrame, which are subclasses of AcFrame and have class scope:
Class SalesDetail Subclass Of AcReport
...
Class OfficeTitleFrame Subclass Of AcFrame
...
End Class
Class CustomerTitleFrame Subclass Of AcFrame
...
22 Programming e.Repor ts
The following illustration shows how e.Report Designer Professional scopes
classes in a report design.
CustomerReportApp
CustomerSection
CustomerFrame CustomerReportApp
Global scope scope
CustomerNameControl
CustomerPhoneControl
CustomerFrame
scope
The following table summarizes the default scope that Design Editor assigns
to classes:
24 Programming e.Repor ts
Component Editor
supports three types of
variables
The assignment of Private or Public to variables affects only what you see on
the Variables page. Actuate Basic does not differentiate between private and
public variables. Whether you specify a variable as private or public, you
access it the same way in Actuate Basic code. In other words, using code, a
private variable is available to the class and its subclasses.
26 Programming e.Repor ts
Variable name
and data type
SetProperties( ) sets
values in code
Sub SetProperties( )
Super::SetProperties( )
Font.Size = 22
Font.FaceName = "Arial"
...
End Sub
Using parameters
Specify a variable as a parameter to gather values when the report runs.
Reports typically use parameters to filter the data to retrieve and display. For
example, a query can specify that the data stream retrieve all customer records
from a Customer table. Parameters support specifying additional filter
conditions when the user runs the report, such as retrieving only records for
customers in California or only records in a specific date range.
You can also create parameters to set properties such as the font and color of
objects when the user runs the report. Variables that you specify as parameters
appear in Requester and the Request web page when the user runs the report.
The following illustrations show parameter variables in Component Editor
and in Requester:
Parameter
variables appear
on the Variables
page of
Component Editor
28 Programming e.Repor ts
When the user
runs a report,
Requester
prompts for
parameters
For more information about parameters and how to create them, see
Chapter 18, “Designing a report parameter,” in Developing Advanced e.Reports.
Using methods
There are three categories of predefined methods in the Actuate Foundation
Classes:
■ Methods you can override
■ Methods you can call
■ Private methods the AFC framework calls
For a complete list of AFC methods and an explanation of whether they are
callable, overridable, or private, refer to Chapter 1, “The Actuate Foundation
Class library,” in Actuate Foundation Class Reference.
It is possible to override a private or callable method but doing so is not
advisable. Overriding a private or callable method can adversely impact the
report generation process.
Actuate Foundation Class Reference explains what the methods do and how you
typically use them. In addition, Method Editor and the Methods page of
Component Editor provide a filter that supports viewing methods in these
usage categories. The following illustration shows the filtering options.
30 Programming e.Repor ts
Methods page displays
methods according to the
filter option you select
Overloading a method
Overloading is the practice of supplying more than one definition for a given
method name in the same scope. In other words, Actuate Basic supports
multiple methods with the same name in a single class. You must define
different argument lists for the methods, however. In the following example,
Sum( ) is an overloaded method:
Function Sum( num1 As Integer, num2 As Integer ) As Integer
Function Sum( num1 As Double, num2 As Double) As Double
Function Sum( num1 As Integer, num2 As Integer, num3 As Integer ) As
Integer
The compiler selects the appropriate version of the method based on the
arguments with which it is called. You typically create an overloaded method
to create a method that accomplishes a particular task but which accepts
different arguments.
32 Programming e.Repor ts
Chapter
Creating an object
There are two steps to creating an object:
1 Declare an object reference variable that refers to a class.
2 Take one of the following steps:
■ Create the object using the New or New Persistent keyword.
■ Access an existing object by calling a function that returns an object of
the appropriate class.
The following sections describe these steps in greater detail.
34 Programming e.Repor ts
For more information about Dim, ReDim, Static, and Global, see Chapter 2,
“Statements and functions,” in Actuate Basic Language Reference.
The following sections describe how to use <class> and AnyClass.
36 Programming e.Repor ts
Use Set...New Persistent to keep the object until the user deletes the report.
When e.Report Designer Professional generates the report objects that users
view and interact with, it creates persistent objects by default. For more
information, see “About persistent objects,” later in this chapter.
For more information about the Set statement, see Chapter 2, “Statements and
functions,” in Actuate Basic Language Reference.
7 77
Number1 Number2
.
.
LabelControl1
Text Annual Sales Report
Object reference variable .
Object
.
LabelControl1 .
Text Monthly Sales Report
LabelControl2
.
Object reference variables
Object
38 Programming e.Repor ts
These examples demonstrate two points about object reference variables:
■ More than one object reference variable can refer to the same object.
■ When you change an object’s properties, the change is visible in all
references to the object.
BackgroundColor
BorderStyle
myLabel Start( )
...
Object
BackgroundColor Position
myLabel
BorderStyle Build( )
ObjectA ObjectB
40 Programming e.Repor ts
method in each successively derived class and you must call a specific version,
as described in the following example.
In a hierarchy of classes, ClassC derives from ClassB and ClassB derives from
ClassA. Each class has its own version of the Build( ) method. To write code for
MyLabel, a subclass of ClassC, and use ClassA’s Build( ) method, use the
following statement:
MyLabel.ClassA::Build
If you do not specify ClassA, and write MyLabel.Build instead, the method
from MyLabel executes. If MyLabel’s Build( ) method does not contain
overridden code, the Build( ) method calls Super::Build( ), which is the Build( )
method of Class C.
End Class
.
.
Dim MyObject As DerivedClass
Set MyObject = New DerivedClass
42 Programming e.Repor ts
Dim Control1 As AcTextControl
Dim Control2 As AcControl
Function Description
GetClassID Returns the unique number that e.Report Designer
Professional automatically assigns to all objects. Objects of
the same class have the same ID number. Use GetClassID to
see whether two objects are of the same class without the
overhead of a string compare.
GetClassName Returns the name of the object’s class. Use GetClassName
when you must know an object’s class before performing
an action.
IsKindOf Tests whether an object is of a specified class or is derived
from a specified class. Returns True if the object is an
instance of the specified class or is an instance of a
subclass of the specified class. Otherwise, this function
returns False. Use IsKindOf to test whether an object is of a
particular class before performing an action.
For more information about these functions, see Chapter 2, “Statements and
functions,” in Actuate Basic Language Reference.
44 Programming e.Repor ts
Comparing object reference variables
Use Is to compare two object reference variables and determine whether they
both refer to the same object. The function in the following example compares
controls in a linked list and determines whether they are in a given frame:
Function IsInFrame (frame As AcFrame, control As AcControl) As Boolean
Dim element As AcVisualComponent
Dim iter As AcListIterator
Set iter = frame.ContentList.NewIterator( )
Do While iter.HasMore( )
Set element = iter.GetNext( )
If element Is Control Then
IsInFrame = True
Exit Function
End If
Loop
IsInFrame = False
End Function
46 Programming e.Repor ts
Chapter
Displays general
information
about the
component
48 Programming e.Repor ts
To inspect a class using Component Editor, use one of the following
techniques:
■ In any view that displays the class, double-click the class.
■ Select the class and choose View➛Component Properties.
Component’s superclass.
This component is derived
from AcDoubleControl.
Scope of class.
File where component
resides if the component is
in a library.
An inherited variable
appears in grey.
Use the filter option in Variables to display a set of variables. The following
illustration shows default filter settings.
50 Programming e.Repor ts
For information about the different types of variables, see “About class
variables,” in Chapter 2, “Working with a class.”
Inspecting a method
To view the methods of a class, choose Methods in Component Editor. By
default, Methods displays inherited and locally-declared overridable methods.
You can use the filter option to specify a different set of methods to display.
A method declared in
the class or an
overridden method
appears in black
An inherited
method appears in
grey
52 Programming e.Repor ts
Creating a class variable
To create a variable, use the Variables page of Component Editor.
4 Type the variable name. You can also type the name of an array, such as
MyArray(10) or MultiArray(1 To 3, 1 To 3, 1 To 3).
5 Select the variable data type.
You can use any of the following data types:
■ An Actuate Basic data type, such as integer, Boolean, double, or string,
or a data type you define.
For a list of Actuate Basic data types, see Appendix A, “Actuate Basic
data types,” in Actuate Basic Language Reference.
■ An Actuate Foundation Class data type, such as AcColor or AcFont.
For a list of the Actuate Foundation Class data types, see Chapter 2,
“AFC data types,” in Actuate Foundation Class Reference.
■ The name of any declared class.
For a list of all classes and methods in the Actuate Foundation Class
library, see Chapter 3, “AFC classes,” in Actuate Foundation Class
Reference.
54 Programming e.Repor ts
The options differ depending on whether you select Instance or Static in
step 7. The following table describes the options.
9 Choose OK.
The variable appears in Variables. If you selected Property or Essential
Property for an instance variable, it also appears in Properties.
Editing a variable
You can edit only a variable scoped to a class. You cannot edit an inherited
variable.
To edit a class variable:
1 In any of the views that display a class, double-click the class that contains
the variable to edit.
Component Editor appears.
2 Choose Variables.
3 Select the variable to edit. Choose Edit.
Class Variable appears.
4 Modify the variable and choose OK.
Deleting a variable
You can delete only a variable scoped to a class. You cannot delete an inherited
variable.
To delete a class variable:
1 In any of the views that display a class, double-click the class that contains
the variable you want to delete.
2 Choose Variables.
3 Select the variable you want to delete. Choose Delete.
To recover a variable immediately after you delete it, choose Edit➛Undo.
Overriding a method
Use the following guidelines to prepare to override a method:
■ Understand how the method works and the context in which it runs. You
must answer the following questions:
■ What does the method do?
■ What occurs before and after the user calls the method?
■ What are the rules for calling the super class method?
■ What value must the method return, if any?
For information that provides answers to these questions, see Actuate
Foundation Class Reference.
56 Programming e.Repor ts
■ Decide whether you are replacing or extending the inherited method.
■ To extend the code, you must call the original method in the superclass,
as the following code example shows:
Function Start( ) As Boolean
Start = Super::Start( )
End Function
Depending on the method and what you want to accomplish, you can
call the superclass method before, between, or after your code.
■ To replace the code, do not call the method in the ancestor class. You
must ensure that the replacement code performs all the necessary tasks
that the original method performs. For information about how a
method implements in Actuate Basic, refer to Actuate Foundation Class
Reference.
58 Programming e.Repor ts
5 Specify a return data type for the method, if necessary.
6 Choose OK.
Method Editor appears, displaying the method declaration.
7 Write code for the method. Follow the same rules for writing regular
procedures.
8 To save the method, choose Update or Close.
The method saves when you select another method, choose a different page
in Component Editor, or select another component in the report design.
Naming a method
e.Report Designer Professional imposes no restrictions on what you name a
method, other than those imposed by Actuate Basic. You can use duplicate
method names within a report if the methods are in different scopes or if they
have different argument lists.
For more information about class scope and overloaded methods, see “About
scope,” and “Overloading a method,” in Chapter 2, “Working with a class.”
Use the following guidelines to name a method:
■ Begin a method name with a verb.
For example, GetHorizontalPosition is clearer than XPosition, which
sounds like a property.
Editing a method
You can edit only a method you create or that is overridden. You cannot edit
an inherited method.
60 Programming e.Repor ts
Deleting a method
You can delete only a method you create or one that is overridden. You cannot
delete an inherited method.
Understanding document
Chapter 5
generation
This chapter contains the following topics:
■ Overview of the Factory service
■ Starting the Factory service
■ Creating content
■ Creating a page
■ Instantiating a class
■ Working with a data stream
■ Connecting to a database
Server
activity Actuate
results in Active Portal
DHTML
output
Browser
The ROI and DOI files consist of persistent objects. The Factory service deletes
all transient objects, such as data sources, data filters, and data rows, when it
no longer needs them.
Actuate open server functionality extends the Factory service to use an
executable file to generate a document from a third-party vendor. For more
information about open server technology, see Chapter 13, “Understanding
Actuate iServer options,” in Administering Actuate iServer System.
64 Programming e.Repor ts
The following illustration gives a conceptual overview of activities that occur
in the process of generating an Actuate report.
Input Source
Data
1. Delivers a 3. Passes
data row a frame
Data
Section Page list
stream
2. Creates 4. Creates a
contents page as
needed
Frame and Page and
control flow ROI
Data
Rows
Data rows Frames
Data Page Pages
Content ROI
stream layout
Events
The following sections describe how the Factory service generates a document
and the class protocols that determine how objects in a document fit together.
66 Programming e.Repor ts
The content structure consists of objects that contain data. The page structure
consists of objects that determine how to display document content. The
following illustration shows examples of the two structures.
Content structure Page structure
Report
After instantiating the Report class, the Factory service calls the document’s
Build( ) method, which performs the following tasks:
■ Calls NewPageList( ) to instantiate the page list the document design
specifies.
■ Calls NewContent( ) to instantiate the top-level content the document
design specifies. In a typical design, the top-level content is a document
section.
■ Calls the top-level content’s Build( ) method to build the contents of the
document.
Creating content
All document content, such as a section, a frame, a control, or a chart, follows a
protocol that determines how to build the content. The protocol makes it
possible to connect document components into a variety of configurations. For
example, the top-level content component can be a report, a sequential section,
or a frame. You can nest a report within a report, a section within a report, a
section within a section, a frame within a frame, and so on.
Method Description
New( ) Initializes the object.
Start( ) Prepares the object for build operations. For example, a
report section’s Start( ) method instantiates the
connection and the data stream. The frame’s Start( )
method instantiates the controls it contains.
Build( ) or Builds the object’s contents. For example, a report
BuildFromRow( ) section’s Build( ) method reads data rows from the data
stream, instantiates the contents, and passes the data
rows to them. The frame’s BuildFromRow( ) method
passes the data rows to the controls it contains.
Finish( ) Prepares the object to write to the report object instance
(.roi) file or document object instance (.doi) file. For
example, the report section’s Finish( ) method closes the
data stream and connection.
68 Programming e.Repor ts
Structure Implementation
Report
Build( ) Report Section
New( )
Start( )
Build( ) Frame
Finish( ) New( ) Controls
Start( ) New( )
Start( )
Build( ) Build( )
Finish( ) Finish( )
Method Task
Start( ) 1 Instantiates the connection.
2 Instantiates the data stream.
3 Passes the connection to the data stream.
4 Sets the sort key.
Build( ) 1 Opens the data stream.
2 Creates the Before frame.
3 Reads a row from the data stream.
[salesreps.last]
[customers.customName]
[orders.orderID]
The group section checks the key of each data row it receives. Rows with the
same key value belong in the same group section. A change in a key’s value
from one row to the next indicates the end of one group section and the start of
another.
70 Programming e.Repor ts
The following table describes how the group section implements the core
protocol.
Method Task
Start( ) Initializes the group section.
BuildFromRow( ) 1 Accepts a data row from its container object.
2 Processes the row.
■ If the row is the first row, the group section
determines and stores the value of the sort key.
The group section also creates the Before and
After frames, passes the row to its contents and
returns Continue Building. This return value
indicates to the container object that the group
section needs the next data row.
■ If the row is not the first, the section verifies that
the row’s key is the same as the stored key value.
If the keys match, the group section passes the
row to its content. If the keys do not match,
BuildFromRow( ) returns Rejected Row,
indicating the end of a group section.
3 Repeats steps 1 and 2 until it retrieves all data rows,
returning Continue Building.
Finish( ) Finishes the group section.
Method Task
Start( ) Instantiates and starts the frame’s contents in the order
in which they appear in the structure. The frame’s
contents can be other frames or controls.
BuildFromRow( ) Passes data rows to the frame’s contents.
Finish( ) Calls each control’s Finish( ) method.
Method Task
Start( ) Typically, a control needs only the default logic.
BuildFromRow( ) Sets the control’s value using data from a data row.
■ If a control, such as a line or label control, does not
need the data row, BuildFromRow( ) returns Finished
Building.
■ If a control needs only one row, BuildFromRow( )
sets the value of the control and returns Finished
Building.
■ If a control is an aggregate control, it uses all data
rows. BuildFromRow( ) returns Continue Building.
Finish( ) For an aggregate control, performs final calculations. For
other controls, Finish( ) does nothing.
Creating a page
The content-creation process drives the page-creation process. The two
processes occur concurrently. As each frame completes, the section that
contains the frame passes the frame to the page list. As each page begins or
ends, the page list notifies the section and the section generates a page header
or footer.
Passes
a frame
Section Page list
Sends
Creates an event Creates a page
contents as needed
72 Programming e.Repor ts
As the illustration shows, report sections and the page list work together.
There are three page list styles:
■ AcSimplePageList
■ AcLeftRightPageList
■ AcTitleBodyPageList
A section can work with these styles because a page list follows a standard
protocol. The protocol, defined in AcPageList, consists of the AddFrame( )
method. For more information about AddFrame( ), see “Determining the page
on which to place a frame,” later in this chapter.
Instantiating a class
When you create a report design using Design Editor, you combine
components in a particular order, following a predefined set of component
reference rules. For example, AcReportSection supports the following
references:
■ Connection
■ DataStream
■ Before
■ PageHeader
■ Content
■ PageFooter
■ After
■ Subpage
A component reference appears as a slot in the Structure pane and as a
property in Component Editor, as shown in the following illustration.
74 Programming e.Repor ts
Component references
the report section
supports
Component
reference
properties
Data
Data row 1
Data stream
76 Programming e.Repor ts
Input source
Data
Data stream
Input source
Data
Data stream
Data Data
Data source
(customers)
Data row 1
Data source Multi-input
(orders) data filter
Data row 2 Data row
Data source
(items)
Data row 3
Data stream
Report section
Method Description
Start( ) Opens the data adapter.
Fetch( ) Retrieves a single row. To retrieve all rows, the data
adapter calls Fetch( ) repeatedly until there are no more
rows. Fetch( ) returns Nothing after it retrieves all rows.
Finish( ) Closes the data adapter.
78 Programming e.Repor ts
Order of instantiation
Data source Data filter1 Data filter2 Report section
Flow of data
Method Description
Start( ) Opens the input source. If the input source is a SQL
database, Start( ) opens the database cursor. If the input
source is a spreadsheet or other flat file database, Start( )
opens the file.
Fetch( ) Retrieves a single input row and creates a data row.
Finish( ) Closes the input source.
80 Programming e.Repor ts
Unlike data sources, data filters are optional. If a report uses data from a SQL
database, the database sorts and filters the data using criteria you specify in a
query. Use a data filter only to process the data rows in ways that the database
does not provide. For example, you can use a sort filter if the indexes in the
database do not support the row order your report requires.
Typically, you use a data filter to process data from a non-SQL database or
data that originates from several different external sources. For example, if a
data stream has multiple query data sources, you can merge the resulting data
through a multiple-input filter before passing it to the report. The processing
algorithm always implements in the Fetch( ) method. For examples of creating
a data filter, see “Creating a select filter” and “Creating a sort filter,” in
Chapter 6, “Customizing a report.”
The following table describes the methods for working with a data filter.
Method Description
Start( ) Instantiates and opens the input adapter, the data
adapter that provides data rows to it.
Fetch( ) Retrieves a single data row and processes it. Optionally,
the data filter creates a new data row.
Finish( ) Closes the input adapter.
Variables
Data row
3 A data control gets its value from the data row. The control’s SetValue( )
method retrieves from the data row the value of the column, variable name,
or method name specified in the control’s ValueExp property.
4 The build process generates the code in SetValue( ) and matches the
control’s ValueExp value with the corresponding data row variable when
the report generates. SetValue( ) returns the value of the data row variable.
82 Programming e.Repor ts
Connecting to a database
A connection establishes a communication link to a database. You can place
the connection in either a section or the data stream. Where you place the
connection depends upon whether data adapters must share a connection.
Data Row
Connection
84 Programming e.Repor ts
Data source Connection class
Progress AcProgressConnection
AcProgressSQL92Connection
SAP AcSAPConnection
Sybase AcSybaseConnection
AcSybaseDBLibConnection
DB Cursor
86 Programming e.Repor ts
Part
Customizing a report
Chapter 6
90 Programming e.Repor ts
Sub OnRead( )
Super::OnRead( )
ExtendedCost = Cost * Quantity
DaysLate = Date( ) - DueDate
If DaysLate < 0 Then
DaysLate = 0
End If
End Sub
You can also create a method that calculates and returns the value. For
example, instead of creating the DaysLate variable and writing code in
OnRead( ) to calculate the value, you can encapsulate the code in a method in
the data row class. You can then use the method name in the ValueExp
property of the control with which to display the days late value.
The data source calls OnRead( ) once for each data row right after the row
receives its data from the input record. The call to the OnRead( ) method of the
superclass is not necessary but it is a good programming habit in case of future
functionality changes.
92 Programming e.Repor ts
Function Fetch( ) As AcDataRow
Dim row As CustomerRow
Do
Set row = InputAdapter.Fetch( )
If row Is Nothing Then
Exit Function
End if
Loop until row.State = "CA"
Set Fetch = row
End Function
5 Override the filter’s Compare( ) method to specify how to sort the rows.
Compare( ) takes two rows as arguments and returns one of the following
values:
■ A positive number if the first row goes after the second row
■ 0 if both rows are the same
■ A negative number if the first row goes before the second row
Use the CompareKeys( ) method to compare field values. CompareKeys( )
performs data type-independent comparisons. For a descending sort order,
negate the value CompareKeys( ) returns.
' Compare the customer id. Compare two integers by subtracting them
Compare = cust1.ID - cust2.ID
End Function
94 Programming e.Repor ts
The report design contains Connection and DataStream components. Next,
you define two new variables for the DataStream component to facilitate
connection to the flat file.
96 Programming e.Repor ts
2 Choose Variables.
3 Choose New to create new data row variables. These variables must
correspond exactly to the fields in the flat file.
The following illustration shows the settings for a flat file that contains two
string fields, First and Second, and an integer field, Figures.
Channel = FreeFile( )
Open DataInputFile For Input As Channel
End Function
5 Choose Close.
6 Override the Fetch method. Type the following code:
Function Fetch() As AcDataRow
Dim rowAs DataRow
If EOF (Channel) Then
Exit Function
End If
Set row = New DataRow
Input #Channel, row.First, row.Second, row.Figures
Set Fetch = row
AddRow( Fetch )
End Function
7 Override the Finish() method to close the flat file. Type the following code:
Sub Finish( )
Super::Finish( )
Close #Channel
End Sub
8 Run the report.
98 Programming e.Repor ts
■ Create a merge filter that combines the data rows from two input adapters.
Use the following steps to create a multiple input filter:
1 Remove the DataStream component from the report, if there is one.
2 Place a data filter component into the DataStream slot.
Select Component appears.
3 Select Multiple-Input Filter. Choose OK.
4 Place a data source into the Input slot of the multiple input filter.
The multiple input filter gets its data from these data sources. If you use a
SQL query data source, use Query Editor to select the data to retrieve.
5 Place another data source into the multiple input filter.
The new data source appears as a second Input slot for MultipleInputFilter.
6 Override the multiple input filter’s Fetch( ) method to code the filter
algorithm.
' Assign the data from the first row to a variable in the new data row
If Not aOrderDataRow Is Nothing Then
aMergedDataRow.orderID = aOrderDataRow.orders_orderID
Else
aMergedDataRow.orderID = Null
End If
' Assign the data from the second row to a variable in the new data row
If Not aCustomerDataRow Is Nothing Then
aMergedDataRow.customName =
aCustomerDataRow.customers_customName
End If
Set Fetch=aMergedDataRow
End Function
The following illustration shows the first page of the generated report. Each
row contains data from the Customers and Orders tables.
Using GetControlValue( )
GetControlValue( ) returns the value of another control within the same frame.
To get the value of PriceCurrencyControl, override one of CodeLabelControl’s
methods to call GetControlValue( ). Choose a method that the Factory service
can call anytime after the data value is available, such as BuildFromRow( ) or,
for an aggregate control, Finish( ).
In the following code example, the control’s OnRow( ) method contains the
conditional code. To see the OnRow( ) method:
1 Open Component Editor by double-clicking a component.
Debugging a report
Chapter 7
Run-time errors
Your document can be free of compilation errors but still fail to generate
because it contains run-time errors. These errors occur while the code
executes. Run-time errors result when e.Report Designer Professional tries to
perform an impossible task, such as opening a file that does not exist or trying
to divide a number by zero. Like compilation errors, run-time errors are easy
to find and fix. When Actuate Basic encounters a run-time error, it stops
document generation and displays the method containing the error. An arrow
points to the line where the error occurs.
Logic errors
If your code is syntactically correct and runs without errors, it can still produce
incorrect results. For example, you can expect your code to calculate a
particular value but it results in an erroneous value. These errors, called logic
errors, occur if, for example, you use the wrong operator or function, forget to
initialize a variable, or assign an incorrect value to a variable.
Actuate Basic cannot identify logic errors as it can compile and run-time
errors. Much of your debugging effort typically goes into solving logic errors.
Debugging tools help you identify logic errors by letting you monitor the
values of your program variables and objects as the program executes.
3 Set a breakpoint at the line of code where you want to stop execution by
choosing Debug➛Toggle Breakpoint or pressing F9.
For more information about using breakpoints, see “Running to a
breakpoint,” later in this chapter.
4 Close the source file window.
5 Choose Report➛Build and Run to start code execution.
When Actuate Basic reaches the breakpoint, it stops program execution.
You can then use Actuate’s debugging features to manipulate code
execution or inspect variable values. These features are explained later in
this chapter.
Design Properties consists of two sections, the Parameters section, and the
Simulated Page Security Viewing section.
3 Enter the required data in Simulated Page Security Viewing.
1 If the users have full read privileges, choose View with Full Read
privilege.
2 User1, User2, User3, and User4 represent access control lists. Specify the
set of user names for users who share the same privilege levels in your
database. Separate the user names with commas as shown in the
following illustration.
3 Note the available pages for this set of users. Determine whether the
available pages correspond to the users’ privilege level.
Running to a breakpoint
Use breakpoints to pause program execution at specific locations so you can
see what is happening. For example, if you have a complex method that is not
working and you do not want to trace through each line, set a breakpoint at
the beginning of the method. When Actuate Basic encounters a breakpoint, it
suspends execution just before the line with the breakpoint. You can then use
the other debugging tools to inspect the state of the method or trace execution
line by line from that statement.
To set and clear breakpoints:
1 In Method Editor or Actuate Basic source file window, place the insertion
point on the line of code where you want to set or clear a breakpoint.
2 Take one of the following actions:
■ Press F9.
■ Choose Debug➛Toggle Breakpoint.
■ Choose the Breakpoint icon on the toolbar.
A red dot appears to the left of the line of code to indicate that a breakpoint
has been set. Clearing a breakpoint removes the red dot.
Local variables
Instance variables
Actuate Basic sets a run-time stack limit of 200. A report that exceeds this limit
causes a fatal error in e.Report Designer Professional and e.Report Designer. A
report using recursion with a large number of iterations can exceed this limit.
page-level security
This chapter contains the following topics:
■ About personal views
■ About page-level security
■ Designing a report with page-level security
■ Testing a report design security example
■ Testing a security requirement example
■ Customizing the Security ID
■ Customizing the Access Control List
■ About the secure read privilege
VP VP VP
CTMgr CTMgr CTMgr
Rep1102 Rep1337
1 2 3
VP VP VP
MAMgr MAMgr MAMgr
Rep1002 Rep1076
4 5 6
This report contains a list of customers in a sales region. The VP user can
access every page in the report and can see the name of every customer in the
region. The state managers, CTMgr and MAMgr, can see only the names of
customers in their states. User CTMgr can access pages 1, 2, and 3. User
MAMgr can access pages 4, 5, and 6. The sales representatives can access only
one page and can see only the names of their customers.
GrantExp = "VP"
For more information about GrantExp, see “How to grant access to the pages
in a section,” later in this chapter.
RSSE
Report User’s
Security
IDs
GrantExp
Access
Control List List of
iServer visible
(one per
page) pages
4 Choose OK.
The report design has an outer group section, StateGroup, and an inner group
section, RepSection.
The GrantExp property for RepSection is set to "Rep" & CStr( [repID] ), where
[repID] is a database column. For each value of [repID] in the database,
GrantExp returns a Security ID that corresponds to a security role in the
Encyclopedia volume. For example, for 1102, GrantExp returns Rep1102. The
CStr function converts the expression to the String data type.
The label control is the title, Page Security Example. One text control displays
the page’s Access Control List at the top of each page of the report. This text
control’s ValueExp property is set to GetPageList( ).GetCurrentPageACL( ).
The page number controls display the visible page count, visible page number,
actual page count, and actual page number for each page of the report. The
page number controls’ PageNumberType property determines which number
appears. For example, for the visible page number, the PageNumberType
property is VisiblePageNumber.
When you view the report using the read privilege, the visible page count is
the same as the actual page count.
The visible page count is less than the actual page count. The report contains
only the page whose Access Control List includes the Security ID Rep1102.
In this example, there is a third simulated report user, User 3. User 3 has one
Security ID, ProdMP1608s. This Security ID corresponds to a security role in
the Encyclopedia volume.
viewing events
This chapter contains the following topics:
■ About report viewing events
■ Creating a context menu
■ Providing help
Mouse events
A visual object in a report can respond to the following four mouse actions:
■ Mouse button down (press)
■ Mouse button up (release)
■ Click (Mouse button down plus mouse button up)
■ Double-click
Mouse
button Press Release Click Double-click
Left OnLButtonDown( ) OnLButtonUp( ) OnLButtonClick( ) OnLButtonDblClk( )
Default action: Default action: Default action: Default action:
Selects the object Nothing Nothing Nothing
Right OnRButtonDown( ) OnRButtonUp( ) OnRButtonClick( ) OnRButtonDblClk( )
Default action: Default action: Default action: Default action:
Displays a context Nothing Nothing Nothing
menu
For more information about each mouse event method, see Class
AcVisualComponent in Chapter 3, “AFC classes,” in Actuate Foundation Class
Reference.
Parameter Description
View The window in which the report user view the report
Shift Indicates the state of the Alt, Ctrl, and Shift keys at the
time of the mouse event
x The horizontal position of the mouse cursor at the time
of the mouse event, measured in pixels relative to the
left of the view
y The vertical position of the mouse cursor at the time of
the mouse event, measured in pixels relative to the top
of the view
If view.IsSelected( me ) Then
If Shift BAND ControlKey Then
OnLButtonDown = True
view.SelectElement( me, False )
Else
OnLButtonDown = False
End If
Else
OnLButtonDown = True
If Not ( Shift BAND ControlKey Or Shift BAND ShiftKey ) Then
view.DeselectAll
End If
view.SelectElement( me, True )
End If
End Function
Context menus are only available when the user views the report in the
Actuate Viewer.
Context menu
Help
Context menu
To... Override
Link one object to another and make this OnFollowLink( ) or set
capability accessible through the Default Action the LinkToExp property
menu item.
Assign a different action to the Default Action OnActuate( )
menu item. For example, a more appropriate
default action for a control that contains a sound
file would be to play the sound.
Add menu items to the default context menu. AddMenuCommands( )
Omit the context menu. If you do not want to OnRButtonDown( )
provide help or let users perform any actions
through the context menu, it would be better to
get rid of the menu altogether.
The following code illustration shows how to create a menu item for the
context menu.
Sub AddMenuCommands( menu As AcPopupMenu)
' Execute the default processing
Super::AddMenuCommands( menu )
' Create a line to separate the new menu item from the previous item
menu.AddSeparator
Default Action
Help
Evaluate Discount
Providing help
You can provide two types of help for objects in a report:
■ Balloon help appears when the user hovers the cursor over an object.
■ Context-sensitive help appears when the user chooses the Help button or
right-clicks and chooses Help from the context menu. Context-sensitive
help is available only in the Actuate Viewer.
You can display different text for context-sensitive and balloon help.
Status
2. Hover the cursor over Status In Evaluation
Closed
Pending
Status of sales
The following illustration shows the method calls that implement context-
sensitive help when a user presses the right mouse button.
OnRButtonDown( ) OnContextMenu( )
OnHelp( ) AddMenuCommands( )
The following illustration shows how the HelpText string appears when a user
chooses Help.
stored procedure
This chapter contains the following topics:
■ About stored procedures
■ Designing a report with stored procedures
■ Working with stored procedures dialogs
■ Working with data from a stored procedure
■ Working with sample values for input parameters
■ About input and output parameters
■ About Oracle8 and Oracle9i stored procedures
■ Customizing a stored procedure
Stored Procedure Name Editor supports modifying the name of the stored
procedure component. If you edit the name, be sure the stored procedure’s
parameter and result columns are consistent with the new name.
■ Use Synchronize Stored Procedure With Schema to determine whether the
content of a stored procedure in your design is consistent with its definition
in the database. You can access this icon from the toolbar in Stored
Procedure Data Source Builder.
■ Sample Parameter Values.
When you work with stored procedures, the database connection must
access the data source that contains the procedures. If the connection is not
the one you want, do the following:
1 Choose Tools➛Database Connection to modify your existing database
connection properties or create a new connection.
5 Drag Database Source from the Data palette and drop it in DataStream.
You are now ready to work with your report. For more information, see
“Working with stored procedures dialogs,” later in this chapter.
If any of the stored procedure’s result columns have the same name,
Actuate e.Report Designer adds a suffix to each duplicate column name so
that every column name is unique. For example, if two result columns have
the name MYCOL, e.Report Designer renames one of them MYCOL_1.
3 From the Field List, drag each item you would like to appear in your report
and drop it into the Content frame.
Consult the designer of the stored procedure for the definitions of the result
column fields.
4 Arrange controls in the frames. In Before and After frames, place the
column headers and controls for totals.
You might want to verify that the stored procedure you are using has not
changed since you first worked with it. For more information, see
“Synchronizing the stored procedure design,” later in this chapter.
2 In Stored Procedure, specify whether you want to view and work with user
procedures, system procedures, or both.
If your database cannot distinguish between user procedures and system
procedures, this feature is transparent.
3 You can narrow your list of stored procedures. Type a search expression for
Stored procedure pattern match, such as:
"*Salary*"
The Stored Procedure Browser now lists only stored procedures with
Salary in the name.
For information about search syntax, see Chapter 5, “Working with an
information object for Actuate Query,” in Using e.Reports.
The named field items you specify as input parameters appear in the
Requester or Request page when the user runs the report.
Stored procedure
Oracle connection
Stored procedure component
Result columns
Sub SetProperties ( )
Super::SetProperties ( )
ProcedureName = "REFCUR3.GETMGRDATA"
OwnerName = ""
QualifierName = "SCOTT"
QualificationOption = "UNQUALIFIED"
ReturnParameter = ":acProcStatus"
ActualParameters = " :INDEPTNO , :EMPCURSOR , :DEPTACCT"
CursorParameter = "acProcStatus"
End Sub
' Define the procedure input parameter; pass the value "v” to the procedure
statement.DefineProcedureInputParameter("@charin", "v")
' Define the procedure’s output parameters
statement.DefineProcedureOutputParameter( "@charboy", V_STRING )
statement.DefineProcedureOutputParameter( "@int_out", V_INTEGER )
MsgBox( "Expecting false for next set: got: " & cursor.StartNextSet( ) )
' Return the values of the stored procedure’s output parameters
rpcParam1 = cursor.GetOutputParameter("@charboy")
connection.Disconnect( )
arg_in_date = CDate("01/01/2000")
If stmt.DefineProcedureInputParameter("arg_in_date", arg_in_date) = 0
Then
Exit Function
End If
If stmt.Execute() = 0 Then
stmtText = Conn.GetSpecificErrorText()
Exit Function
End If
tempDate = stmt.GetOutputParameter("arg_out_date")
End Function
' Define the input parameter; pass the value "John Smith" to the procedure
name = "John Smith"
If statement.DefineProcedureInputParameter ( "p_name", name ) = 0 Then
' Get the output parameter value, the id associated with "John Smith"
newId = statement.GetOutputParameter ( "p_id" )
Print #1, "Function Return Value - id = ", newId
End Sub
The following statements are examples of how to map the data types in
DefineProcedureOutputParameter( ):
statement.DefineProcedureOutputParameter("@charboy", V_STRING)
statement.DefineProcedureOutputParameter("@int_out", V_INTEGER)
code
This chapter contains the following topics:
■ About custom browser code
■ About the browser scripting control
■ Including global custom browser code
■ Creating an HTML form
■ Generating custom browser code dynamically
■ Printing and viewing a report using the PDF converter
■ Printing and viewing a report using the Actuate Viewer
■ Creating an example library for Internet Explorer
■ Creating a report for viewing in Netscape
The DHTML converter treats the browser scripting control differently from
other Actuate controls. Ordinarily, the DHTML converter escapes characters
that have special meaning for the web browser, such as:
■ <
■ >
■ "
<b>MyText</b>
DHTML
converter
<b>MyText</b>
Web
<b>MyText</b>
browser
<b>MyText</b>
DHTML
converter
Web Output of
browser context block
If the web browser is Internet Explorer, the context block might look like the
following:
<DIV ID="I732" CLASS=C141
STYLE="position:absolute;
left:171.00pt; top:0.00pt;
height:46.00pt; width:136.00pt;
border-style:double; border-width:1.00pt;
font-size:12.00pt; text-align:left;
overflow:hidden; padding-top:0.00pt;
">
< !— [START Custom browser code -- >
<b>MyText</b>
< !— END] Custom browser code -- >
</DIV>
The control’s visual properties, such as background color and border style, are
specified in the report design and included in the context block. In this context
block, the background color, yellow, is specified by the class attribute and the
border style, double, is specified by the border-style attribute. The output of
the context block is the string MyText in bold enclosed by a yellow rectangle
with a double-line border.
MyText
If you selected Display Sample Data in the Options dialog, the control
displays the value of the SampleValue property. Otherwise, the control
displays the value of the AlternateText property.
Setting of
BrowserClipping Setting of overflow Behavior in
property CSS attribute Internet Explorer
AutoScrollbar Auto Scroll bars shown
when necessary.
Scrollbar Scroll Scroll bars always
shown, active when
necessary.
ClipToControlSize Hidden Clip to control size.
NoClipping Visible No clipping. DIV
block is resized as
necessary.
The following table shows how the setting of the BrowserClipping property
maps to the clip:rect(top right bottom left) CSS attribute for Netscape
Navigator. If BrowserClipping is set to AutoScrollbar, Scrollbar, or
ClipToControlSize, the output of the custom browser code is clipped to the
control size. If BrowserClipping is set to NoClipping, the DHTML converter
does not generate a clip:rect(top right bottom left) CSS attribute for the LAYER
element.
Setting of
BrowserClipping Setting of clip:rect() Behavior in
property CSS attribute Netscape Navigator
AutoScrollbar Control size Clip to control size.
Scrollbar Control size Clip to control size.
ClipToControlSize Control size Clip to control size.
NoClipping Not generated No clipping.
To hide a browser scripting control in the Viewer, take one of the following
steps:
■ Make the height and width of the control very small.
■ Place another control on top of the browser scripting control.
■ Set ShowWhenPrinting and ShowWhenViewing to false.
■ Set BackgroundColor and Border Color to TransparentColor. Then set
AlternateText to an empty string or set Font Color to TransparentColor.
Using DHTMLForm
DHTMLForm defines several new variables and overrides two methods.
Property Value
FormAction http://radium:8700/acweb/
executereport.do?__requesttype=immediate&__
executableName=%2fSales%20Conferences%2f
SummaryTimeSeries%2erox
FormMethod POST
FormName FormBasedForm
This example submits a request for immediate execution in iServer. The report
user typically submits a request by clicking a button in a form. For more
information about Actuate Active Portal JavaServer Pages, see Creating Custom
Web Applications using Actuate Active Portal.
Using OnRow( )
OnRow( ) defines an Option element for each menu option and assigns the
code to MenuCode. OnRow( ) is called repeatedly because BuildFromRow( )
returns ContinueBuilding. Override OnRow( ) as shown in the following
example:
Sub OnRow ( row as AcDataRow )
'Insert your code here
Dim NL as String
Dim TAB as String
Dim i as Integer
NL = Chr$(10)
TAB = Chr$(9)
i = 0
text = row.GetValue(OptionText)
value = row.GetValue(OptionValue)
End Sub
Using Finish( )
Finish( ) generates a Select element and assigns the code to FinalMenuCode.
Override the Finish( ) method as shown in the following example:
Sub Finish( )
Super::Finish( )
'Insert your code here
FinalMenuCode = "<SELECT NAME=' " + MenuName + " '>"
FinalMenuCode = FinalMenuCode + MenuCode + Chr$(10)
FinalMenuCode = FinalMenuCode + "</SELECT>" + Chr$(10)
FinalMenuCode = FinalMenuCode + MenuScript
EndSub
Using BrowserCode( )
The BrowserCode( ) method assigns FinalMenuCode to the BrowserCode
variable. The BrowserCode variable passes to the DHTML converter. Override
the BrowserCode( ) method as shown in the following example:
Function BrowserCode( ) As String
'Insert your code here
BrowserCode = FinalMenuCode
End Function
Subclassing DHTMLMenuControl
By subclassing DHTMLMenuControl from the library, you can create a
browser scripting control that generates a drop-down menu when a report
appears in a web browser. For example, you can create a control called
CustomerMenu that generates a drop-down menu listing all customers in the
sfdata database.
Set the MenuName, OptionText, and OptionValue properties as shown in the
following illustration. The OnRow( ) method uses values of OptionText and
OptionValue to generate an Option element for each menu option. Because
OptionText is set to customers.customName, the customer name displays in
the menu. The value of MenuName is used by the Finish( ) method to generate
a Select element.
XML data
This chapter contains the following topics:
■ About the XML data format
■ About the View process
■ Publishing an Actuate report as XML
Chart & MS IE IE
ROX image DHTML browser
cache cache
Converter
XML
frameworks
Search
Basic Page
engine security Acrobat
TOC Reader
PDF
XML
data
Custom
Report documents applications
The View process translates a report to XML format then either converts it to
another format or sends the XML data directly to other applications for
processing.
Property Description
XMLCharSet The encoding declaration to insert in the XML prolog.
If not specified, Actuate software does not include an
encoding declaration in the XML prolog.
XMLDocType The document type string to display in the
document’s DOCTYPE declaration.
XMLFileDescription The description of the XML file to build. The default
value is XML Files.
XMLFileExtension The file extension of the XML file to build. The
default value is xml.
Property Description
XMLAddContents Determines whether to search through a component’s
contents recursively to find other components for
which to generate XML. The default value is true. Set
this value to false to skip over sections or frames for
which you do not want to generate XML data.
XMLAttributes A set of additional attribute values to add to the current
XML element. Use XMLAttributes to add fixed
attributes. Use controls to add attributes that vary
depending on the data in the data row.
XMLTag The XML element or attribute name for this component.
XMLType The type of XML object the component represents. The
values are:
■ XMLAttribute. The component is an XML attribute.
■ XMLCustom. A custom XML element. AFC calls the
GenerateXML( ) method to generate the custom
element.
■ XMLElement. The component is an XML element.
■ XMLEmptyAttribute. The component is an empty
XML element.
■ XMLIgnore. Do not generate XML for the
component. XMLIgnore is the default value for
XMLType.
The report design defines the Address element using the following properties:
The report design defines the List Price element using the following
properties:
Understanding report
Chapter 13
bursting techniques
This chapter contains the following topics:
■ About report bursting
■ Understanding report bursting techniques
■ Understanding report bursting tasks
■ Examining report bursting examples
Summary entry
Detail report
Detail query
Reference to
master report’s
PageList
component
The SQL tab of Query Editor appears as shown in the following illustration.
Master report
Group section
Summary entry
Detail report
Group section
Reference to
master report’s
PageList
component
Programming
Part 3
Introducing Actuate
Chapter 14
Basic
This chapter contains the following topics:
■ About Actuate Basic
■ Programming with Actuate Basic
■ Understanding code elements
■ Adhering to coding conventions
■ Using the code examples
About statements
A statement is a complete set of instructions directing Actuate Basic to execute
a specific task within a method. A procedure typically contains a series of
Actuate Basic statements that perform an operation or calculate a value.
Procedure
Sub SetLabelBackgroundColor( anyControl As AcLabelControl )
Dim Label As MyLabel
If GetClassName(anyControl) = "MyLabel" Then
Set Label = anyControl Statements
Label.BackgroundColor = Red
End If
End Sub
About expressions
An expression consists of values and operators combined in such a way that
the expression evaluates to one of the Actuate Basic data types. The type of the
operands in an expression determine the expression type.
In an expression that contains an operation, Actuate Basic considers the types
of all operands to determine the type of the result. For example, if you add two
integers, the result of the expression is an integer. But if you mix data types in
an expression, Actuate Basic makes the result the type of the widest range. For
example, the expression 3 * 4.55 results in a double.
To avoid mixing types in an expression, you can use type-declaration
characters with numeric constants. These characters force a constant to take on
a specific type. For example, 10 is an integer, but 10@ is a currency value. Thus,
10@ + 20@ yields a currency value of thirty dollars or thirty francs, depending
on the locale. For more information about type-declaration characters, see
“Using a type-declaration character,” in Chapter 15, “Understanding variables
and data types.”
About operators
An operator is a symbol or keyword that performs an operation, such as
adding or comparing, on an expression. Actuate Basic provides the following
types of operators:
■ Arithmetic
■ Comparison
■ Logical
■ Concatenation
Using exponentiation
The exponentiation operator support computing powers and roots. A power is
computed using a positive exponent and a root is computed using a negative
exponent. For example 10 ^ 3 evaluates to 1000, 10 cubed. Conversely, 1000 ^ -
3 evaluates to 10, the cube root of 10.
Commenting code
Code comments make a procedure easy to understand and maintain,
especially if other programmers work with your code. Actuate Basic
recognizes two comment markers:
■ The apostrophe (')
■ Rem
Actuate Basic treats characters to the right of a ' character or Rem as comments
and does not execute those lines. A comment can follow a statement or occupy
an entire line. A comment cannot follow a line continuation character. The
following code example shows a comment.
Indenting code
Indenting lines of code gives a visual clue to the hierarchy of statements,
especially if the procedure contains nested procedures and statements.
Indentation also makes it easy to see a construct that has unbalanced
beginning and ending statements.
Understanding variables
Chapter15
Declaring a variable
Declare a variable using the Dim, Global, or Static statements, as shown in the
following examples:
Dim Total As Integer
Global FileName As String
Static Counter As Integer
Some implementations of Basic support implicit declaration of variables.
Actuate Basic does not. Implicit declaration of a variable means that you can
use a variable name in your code without having previously declared it.
Because good programming practice discourages implicit variable
declarations, Actuate Basic requires that you explicitly declare a variable
before using it.
The scope of a variable determines which procedures access the variable.
Depending on how and where you declare it, a variable has one of three
scopes.
Declare
Global XVar As Integer
Global YVar As String
End Declare
Although global variables are useful in certain situations, avoid using them.
They can contribute to the creation of complex state machines and can make
the logic of an application hard to understand. Use a local variable whenever
possible.
Declaring an array
An array is a series of objects of the same size and data type. Each object in an
array is called an array element. Elements in an array are contiguous. You use
an index number to differentiate elements.
For example, you can declare an array of integers or an array of doubles, as
shown in the following example:
Dim Counters(14) As Integer ' Integers, indexed 0-14 or 1-14,
' depending on the Option Base statement
Dim Sums(50) As Double ' Doubles, indexed 0-50 or 1-50
Dim Sums(10 To 20) As Double ' Doubles, indexed 10-20
You can also create a Variant array and populate it with elements of different
data types. For example, you can create an array that contains both integers
and strings. For more information about working with data types, see “About
data types,” later in this chapter.
Using an array, you can set up loops that efficiently manage a number of cases
by using the index number. An array has both upper and lower bounds, such
as 1-50 or 10-100. Because Actuate Basic allocates space for each index number,
avoid declaring an array larger than necessary.
About constants
For a value that does not change during the life of a report, Actuate Basic
supports declaring a constant. A constant is a reserved memory location of
which the content does not change. The following examples set constant
values:
Const Pi = 3.14159265358979
Const FirstName = "James"
Const MyAccount = 25.43
These examples do not contain type declarations. In such cases, Actuate Basic
assigns the most appropriate data type. Pi is a Double and FirstName is a
String. MyAccount, however, can be a Single, Double, or Currency. In such a
case, Actuate Basic assigns the data type that uses the least amount of space, in
this case a Single, which is probably not what the programmer intends. To
specify that MyAccount is Currency, use the following syntax:
Const MyAccount@ = 25.43@
Constants improve the readability of your code and reduce the chance for
typing errors. Although a constant resembles a variable, you cannot change its
value. If you attempt to do so, Actuate Basic sends an error message.
Declaring a string
You can declare a variable as a string if it will always contain text and you
never expect to treat it as a number in a calculation:
Dim myString As String
You can assign strings to this variable and modify the variable using string
functions. Use double quotation marks to delimit a literal string in an
expression:
myString = "Actuate Basic"
newString = Left(myString,7)
A string variable or argument is a variable-length string. The string grows or
shrinks as you assign new data to it.
Manipulating a string
You can manipulate a string, including a binary string, using Actuate Basic
string functions. There are two types of string manipulation functions, one for
ANSI strings and another for binary strings. You can use the ANSI versions
without any preparatory steps. To use the binary versions, follow these steps:
1 Place the binary data in a byte array using Get or another function.
2 Assign the byte array to a string. This assignment does not translate the
binary data. It simply copies the data into a string variable.
3 Use the binary version of the functions in the following table to manipulate
the binary data in the string.
Function Description
Asc Returns the ANSI character code for the first
character.
InStr Returns the first occurrence of one string within
another.
InStrB Binary flavor of InStr. Returns the first occurrence of
a byte in a binary string.
Mid Returns a specified number of characters from a
string.
MidB Binary flavor of Mid. Returns a specified number of
bytes from a binary string.
Left, Right Returns a specified number of characters from the
right or left sides of a string.
LeftB, RightB Binary flavors of Left and Right. Returns a specified
number of bytes from the left or right side of a binary
string.
Chr Returns a string containing the ANSI character
specified.
4 Assign the contents of the manipulated binary string back to a byte array.
Formatting strings
The simplest way to format a string is to use the Str function. The syntax is:
Str(<expression>)
When you convert a number to a string using Str, you place either a leading
space or a minus sign in front of the string. If the number is positive, the
leading space implies the plus sign. If the number is negative, the minus sign
goes in front of the string.
For more complicated string formatting, use the more powerful Format
function. The syntax is:
Format(<expression>[,<format>])
where:
■ <expression> is any valid expression
■ <format> is a valid named or user-defined format expression
If you try to format a number without providing a value for the parameter
format, Format provides the same functionality as the Str function.
For more information about the Format function, see Chapter 2, “Statements
and functions,” in Actuate Basic Language Reference.
Comparing strings
The StrComp function returns a value indicating the result of a string
comparison. The syntax for StrComp is:
StrComp(<string1>, <string2>[, <compare>])
where:
■ <string1> is any valid string expression
■ <string2> is any valid string expression
■ <compare> specifies the type of string comparison. The compare argument
can be omitted, or it can be 0 or 1. Specify 0, the default, to perform a binary
comparison. Specify 1 to perform a textual comparison. If compare is Null,
an error occurs. If you omit compare, the Option Compare setting
determines the type of comparison by default.
If StrComp returns
string1 is less than string2 -1
string1 is equal to string2 0
string1 is greater than string2 1
string1 or string2 is Null Null
Changing capitalization
The following table lists four functions to change the capitalization of a string.
Function Description
LCase(<string expression>) Returns a variant in which all letters
are lower case
LCase$(<string expression>) Returns a string in which all letters
are lower case
UCase(<string expression>) Returns a variant in which all letters
are upper case
UCase$(<string expression>) Returns a string in which all letters
are upper case
Removing spaces
The following table lists the functions to remove leading or trailing spaces
from a string.
Function Description
LTrim(<string expression>) Returns a copy of a string without
leading spaces
RTrim(<string expression>) Returns a copy of a string without
trailing spaces
Trim(<string expression>) Returns a copy of a string with
neither leading nor trailing spaces
About numbers
The Integer and Long data types represent numbers that have no fractional
component.
The Single and Double data types can express floating-point numbers. A
floating-point number, also called a real number, represents a value that has a
fractional component. The term floating point comes from the fact that the
decimal point can occur any place within the number, as shown in the
following examples:
0.0003 205.333 30000.0
In contrast, the decimal point in the Currency data type is fixed at four places
of precision.
If you know that a variable always contains a whole number, such as 45 or
30,000,000,000, rather than a number with a fractional amount, such as 3.14159,
declare it as an Integer or Long type. An operations is faster with integers,
which consume less memory than Variants. Integers are especially useful as
counter variables in For...Next programming constructs.
About currency
The Currency data type represents monetary values with a precision of four
decimal places. Currency variables are stored as 96-bit (12-byte) numbers in an
Integer format, scaled by 1,000,000,000 (109) to give a fixed-point number with
20 digits to the left of the decimal point and 9 digits to the right. The Currency
Function Description
DateSerial(yyyy,mm,dd) Returns a date or date serial number
from the year, month, and day
numbers entered. Always specify
four-digit years. The supported date
range for report scheduling is
January 1, 1980 through December
31, 2036, inclusive. The supported
date range for all other data
processing and display, including
database access, is January 1, 100
through December 31, 9999.
Day(x) Extracts the day from a date and
returns a number.
Weekday(x) Determines the day of the week for
this date and returns it as a number
(1 to 7), where Sunday is 1.
Month(x) Extracts the month component of a
date and converts it to a number.
Date(x) Returns the current date.
Year(x) Extracts the year from a date and
returns a number.
You can use date and time literals by enclosing them within number signs (#).
For example:
If Today > #2/25/2003# Then ...
Using an alias
An alias is the simplest type of user-defined data. When you use an alias, you
declare a data type that has the properties of an already existing data type. The
syntax is:
Typedef <new data type> As <existing data type>
Typically, the new data type is one of the Actuate Basic data types. The
following is an example of an AFC type:
Typedef AcColor As Integer
You can also declare an alias to a structure, as the following example shows:
Typedef MyPoint As AcPoint
Using a structure
You create a user-defined data type as a structure in which the elements
contain previously defined data types. These data types can be either Actuate
Basic data types or user-defined data types.
Using a class
A class is a user-defined data type that defines the attributes of an object in a
report. To create an object, you declare a variable that contains a reference to
the object and assign a class as its type. Actuate provides a collection of classes,
called the Actuate Foundation Class Library, that you can use. For more
information about classes, see Chapter 2, “Working with a class.” For more
information about objects, see Chapter 3, “Working with an object.”
procedure
This chapter contains the following topics:
■ About procedures
■ Declaring a procedure
■ Declaring an argument
■ Calling a procedure
■ Overloading a procedure
■ Using a control structure
About methods
A method is a procedure declared within a class. A method performs an action
on an object. Because methods have class scope, they are accessible only to
objects of that class. For information about creating a method, see “Overriding
an inherited method,” in Chapter 4, “Using Component Editor.”
A report typically includes multiple objects of a class. Usually, your code does
not need to specify which object is currently executing. Sometimes, however, a
method or property refers explicitly to a particular object. The Me keyword
supports referring to the object in which the code is running. Use Me as if it
were the Name property of the object:
Sub PrintTotal( )
Me.Print
End Sub
For more information about programming with objects, see Chapter 3,
“Working with an object.”
Declaring a procedure
Actuate Basic supports two types of procedures, Sub and Function. Sub
procedures do not return a value. Function procedures return a value. The
following sections describe how to declare Sub and Function procedures.
Declaring an argument
An argument is a variable you declare in a procedure declaration. An
argument passes a value to the procedure. For example, a procedure that
performs a calculation usually requires a value for processing, as shown in the
following examples. You pass this value to the procedure when you call it. The
arguments are the names the procedure uses for the values you supply. The
first value you supply gets the first parameter name in the list, the second
value gets the second parameter name, and so on:
Function Sum (Num1 As Integer, Num2 As Integer) As Integer
Sum = Num1 + Num2
End Function
Calling a procedure
The techniques for calling a procedure depend on the type of procedure,
where it is, and how your report uses it. The following sections describe how
to call Sub and Function procedures.
Overloading a procedure
Procedure overloading is an Actuate Basic feature that can make your
programs more readable. For example, suppose you write a square root
function that operates on integers and another square root function for
doubles. In Actuate Basic, you can give both procedures the same name,
square_root. By using the name square_root more than once, or overloading it,
you give it more than one meaning.
Actuate Basic distinguishes between versions of the function by the type and
number of arguments. The following examples show procedures with the
same name used in different contexts:
Function square_root( intInput As Integer) As Integer
Function square_root( doubleInput As Double) As Double
Using If...Then...Else
Use an If...Then...Else block to define several blocks of statements, only one of
which executes:
If <condition1> Then
[<statement block 1>]
ElseIf <condition2> Then
[<statement block 2>]
Else
[<statement block 3>]
End If
If...Then...Else is the general case of If...Then. You can have any number of
ElseIf clauses, or none at all. You can include a single Else clause, but only one,
whether or not you have ElseIf clauses.
Using Do...Loop
Use a Do...Loop statement to execute a block of statements an indefinite
number of times. A Do...Loop statement works well when you do not know
how many times to execute the statements in the loop. There are several
variations on the Do...Loop statement but each evaluates a numeric
conditional as a Boolean to determine whether to continue executing.
The following example first tests the condition statement. If false, the loop
code is skipped. If true, the statements execute and the loop repeats until the
condition evaluates to false.
Do While <condition>
<statements>
Loop
Using For...Next
If you know how many times to execute a statement, use the For...Next loop. A
For...Next loop uses a counter that increments or decrements in value during
each step of the loop:
For <counter> = <start> To <end> [Step <step size>]
<statements>
Next <counter>
Programming in the
Part 4
Windows environment
another application
This chapter contains the following topics:
■ Adding an object from another application
■ About object linking and embedding
■ Linking and embedding an OLE object
■ Editing an OLE object
■ Inserting an OLE custom control
■ Moving and sizing an OLE component
■ Subclassing an OLE component
Supported
OLE objects
Linked object
Paintbrush image
Actuate report
Word document
3 Choose OK.
The content of the file you selected appears in the frame.
OLEComponent1 displays
Paintbrush image
OLEComponent2, a subclass of
OLEComponent1, references
Paintbrush image in its superclass
If you modify the OLE object in the subclass, Actuate software creates an
independent copy of the OLE object. Changes to the OLE object in the
superclass do not affect the object in the subclass, and changes in the object in
the subclass do not affect the object in the superclass.
Programming an object
Chapter 18
' Create the OLE Automation object and open the appropriate file
Set excelHandle = CreateObject( "Excel.Application" )
Set workbookHandle = excelHandle.WorkBooks
workbookHandle.Open( "\Actuate\demo\discount.xls" )
excelHandle.Visible = True
creditRating = customerTitle.creditRating.DataValue
purchasePattern = customerTitle.purchasePattern.DataValue
' Loop through all the order items and enter the values into the cells
Do Until sectionChild is Nothing
If IsKindOf( sectionChild, "ItemFrame" ) Then
Set the ItemFrame = excelHandle.Cells(1, curSheetRow)
Set cellHandle = excelHandle.Cells(1, curSheetRow)
cellHandle.Value = theItemFrame.itemCode.DataValue
Set cellHandle = excelHandle.Cells(2, curSheetRow)
cellHandle.Value = theItemFrame.quantity.DataValue
Set cellHandle = excelHandle.Cells (3, curSheetRow)
cellHandle.Value = theItemFrame.priceQuote.DataValue
curSheetRow = curSheetRow + 1
End If
Set sectionChild = orderSection.GetSuccessor( sectionChild )
Loop
End Sub
1. Right-click the
order number to
display context
menu
2. Choose Evaluate
Discount to get
discount information
(executes the
OnEvaluate-
Discount( ) method)
Calling an external
Chapter 19
function
This chapter contains the following topics:
■ Calling an external C function
■ Using a C function with Actuate Basic
■ Declaring a C function
■ Calling a C function
■ Working with a Java object
■ Converting a Java data type
■ About Java exception and error handling
■ Debugging a Java object
Calling a C function
Call a C function as you would an Actuate Basic statement or function,
ensuring that you pass the correct arguments. Actuate Basic cannot verify the
arguments you pass.
Converting an array
Actuate software supports automatic conversion of single-dimension arrays of
primitive types to and from Actuate Basic. The assignment operator (=) copies
a Java array where each element is a primitive type, such as an int, into an
Actuate Basic array. In an assignment operation, you can copy an entire
Actuate Basic array of primitive types into a Java array. The operation copies
each element in the source array to the destination array until the end of either
the source or the destination array. The following example shows how to copy
an array of 10 elements:
Actuate software captures and keeps the last exception object. You can test for
the E_JAVAEXCEPTIONOCCURRED user error and access the exception
object using the GetJavaException() function. For example:
Dim javaObj As Object
On Error Goto HandleError
Set javaObj = CreateJavaObject( "JavaClassName" )
javaObj.TryToDoSomething( ) ' assume this causes a Java Exception
HandleError:
Programming with
Part 5
application programming
interfaces
This chapter contains the following topics:
■ About the programming interfaces
■ A comparison of API features
■ Choosing the appropriate API
Report Search
Task server Requester extension ActiveX
Generate reports Yes Yes 1 Yes 2
Print reports Yes Yes Yes
Configure printer Yes Yes Yes 3
View reports Yes 4 Yes
Build a GUI Yes
application
Modify Yes
parameters
Schedule Yes
execution and
printing reports
Distribute results Yes Yes
Security features Yes
Custom
application Actuate
iServer
Viewer Requester
API
Encyclopedia
volume
Working locally
Local reporting uses e.Report Designer, e.Report Designer Professional, or
End User Desktop rather than iServer for report generation. In the local
configuration, the client machine contains the applications required to
generate, view, and print reports. You cannot work locally in the UNIX
environment. A typical local configuration consists of Requester API and
e.Report Designer, e.Report Designer Professional, or End User Desktop.
Working locally, your Requester application:
■ References report executable, parameter, and output files on a local hard
drive, using standard operating system syntax:
<drive>:\<path>\<filename>
■ Generates and displays reports locally. You specify the location of the
application that compiles and displays the report. You choose report
executable, parameter, and output files using standard file system
conventions.
■ Prints reports locally by specifying a printer the local operating system
recognizes.
You generally specify the path to the library files in your development
environment or copy the DLLs to your system directory. If you use e.Report
Designer Professional, the library files are in the \Program Files\Actuate7\
ErdPro\Lib directory and the DLL files are in the \Program Files\Actuate7\
ErdPro\Bin directory.
<user>
Optional. The name of the user submitting the request.
<password>
Optional. The password for the user submitting the request.
<server>
Optional. The name of the server. If you omit this argument, uses the server to
which the program is currently connected.
<path>
The full path to the directory in which the file resides.
<filename>
The name of the file to access.
Value Description
Latest The most recent version of the file
Oldest The oldest version of the file
LatestDev The most recent development version of the file
LatestRel The most recent released version of the file
<#> The version number of the file
<version name> The version name of the file
The following examples are valid arguments for AcReqViewReport, one of the
Requester API functions that requires the filename argument:
AcReqViewReport( "rotp://Paradise/MyDir/MyReport.roi", AC_REQ_VIEW )
AcReqViewReport( "rotp://Paradise/MyDir/MyReport.rov;Latest",
AC_REQ_VIEW )
AcReqViewReport( "rotp://Paradise/Accounting/July2002/AcctRpt.roi",
AC_REQ_VIEW )
AcReqViewReport( "rotp://Paradise/Accounting/July2002/AcctRpt.roi;15",
AC_REQ_VIEW )
The following table lists the functions for working with report files.
'Write the parameter values you set to a new .rov file. This file is in a
'different directory from the .rox file
AcReqWriteFile( fileNum, "Myreport.rov" )
void CReqReportDlg::OnSession()
{
// Initialize session
sessionHandle = AcReqInitialize();
}
Connecting to iServer
The gateway to the Encyclopedia volume is the iServer connection. iServer
enforces security by requiring a user name and password before validating a
connection and allowing server requests. Once established, the server
Specifying parameters
You must set two parameters prior to report execution:
■ RoiFileName —the name of the output report file
■ RoxFileName —the name of the report executable file
You can also set additional parameters as part of the report design. You set
both the required and optional parameters before running the report. This
example has an optional parameter called customers_creditrank.
You first get parameters from either an .rox or .rov file, then set the parameter
values. Prior to executing the report, you must store the parameters either in a
temporary file that AcReqGenerateReport creates or in an .rov file that you
create. This example uses the .rox file as the report generation argument,
eliminating the need to save the parameters in an .rov file. For a different
method of setting parameters and running a report using an .rov file, see
“Generating a report,” later in this chapter.
The following example shows how to specify parameters in C++. It assumes
you have a report Detail.rox in a folder Western on the server and you have
established a connection:
void CReqReportDlg::OnParameters()
{
// Read the .rox from the server.
fileNum = AcReqReadFile( "rotp://Kilauea/Western/Detail.rox");
// Set the parameter specifying the output .roi name
AcReqSetValueString( fileNum, "RoiFileName", "/Western/Detail.roi");
// Set the parameter specifying the .rox file to be used for report
AcReqSetValueString( fileNum, "RoxFileName", "/Western/Detail.rox");
// Set a report-specific paramater
AcReqSetValueString( fileNum, "customers_creditrank", "C");
}
Specifying parameters
You must set two parameters prior to report execution:
■ RoiFileName —the name of the output report file
■ RoxFileName —the name of the report executable file
You can also set additional parameters as part of the report design. You set
both the required and optional parameters before running the report.
You first get parameters from either an .rox or .rov file, then set the parameter
values. Prior to executing the report, you must store the parameters either in a
temporary file that AcReqGenerateReport creates or in an .rov file that you
create. This example uses an explicit .rov file so it saves the parameters in a
.rov file before running the report. For a different method of setting
parameters and running a report from a .rox file, see “Specifying parameters,”
earlier in this chapter.
The following example shows how to specify parameters in Visual Basic. It
assumes you have a report Detail.rox in a folder Example on your C: drive:
Private Sub SetParameters()
Dim fileNum As Long
' Open detail.rox to access the parameter definitions
fileNum = AcReqReadFile("C:/Example/Detail.rox")
' Set parameter values
AcReqSetValueString fileNum, "RoiFileName", "C:/Example/Mydetail.roi"
AcReqSetValueString fileNum, "RoxFileName", "C:/Example/Detail.rox"
AcReqSetValueString fileNum, "customers_creditrank", "C"
' Write the parameter values to Mydetail.rov
AcReqWriteFile fileNum, "C:/Example/Mydetail.rov"
' Close the file
AcReqClosefile(fileNum)
End Sub
Viewing a report
To view the report the previous example report generated, add the following
line to the procedure:
AcReqViewReport "C:/Example/Mydetail.rov", AC_REQ_VIEW
Printing a report
To print a report using server resources, set the printer and invoke the
AcReqPrintReport method. Specify a printer the local operating system
recognizes:
Private Sub PrintReport( )
Dim ret As Long
AcReqSetDefaultPrinter
ret = AcReqPrintReport( "C:/Example/Mydetail.roi", AC_REQ_PRINT )
End Sub
As an alternative, you can print the report by specifying the AC_REQ_PRINT
option in the AcReqGenerateReport command.
Closing a session
Terminate the API session by calling AcReqUnInitialize:
Private Sub Form_UnLoad( Cancel As Integer )
AcReqUnInitialize( sessionNum )
End Sub
... do what is necessary after report is done, or after API failure ...
AcReqSetEUDTPath("C:\Program Files\Actuate7\ErdPro\Bin\Runview.exe")
fileNum = AcReqReadFile( DetailRox )
If (AcReqGetError(fileNum)) Then
MsgBox (AcReqGetErrorString(fileNum))
Exit Function
End If
value = GetValue()
AcReqSetValueString( fileNum, "RoiFileName", SmallDetailRoi )
AcReqSetValueString( fileNum, "RoxFileName", DetailRox )
AcReqSetValueString( fileNum, "orders_orderID", value )
AcReqWriteFile( fileNum, SmallDetailRov )
If (AcReqGetError(fileNum)) Then
MsgBox (AcReqGetErrorString(fileNum))
OnLButtonDown = False
Exit Function
End If
AcReqCloseFile( fileNum)
' Set the options to view the small report
generateReport= True
viewRpt = True
printRpt)= False
stayopen= True
async = False
always = True
hide = False
opts = 0
If ( generateReport = True ) Then
opts = AC_REQ_GENERATE
End If
If ( viewRpt = True ) Then
opts = opts + AC_REQ_VIEW
End If
If ( printRpt = True ) Then
opts = opts + AC_REQ_PRINT
End If
If ( stayopen = True ) Then
opts = opts + AC_REQ_STAY_OPEN
End If
If ( async = True ) Then
opts = opts + AC_REQ_ASYNC
End If
OnLButtonDown = True
End Function
PrintReport_Click( )
AllTypes_Click( )
FindParms_Click( )
GenerateServerReport_Click( )
ViewServerReport_Click( )
fileNum = AcReqReadFile(DetailRox)
If (AcReqGetError(fileNum)) Then
MsgBox (AcReqGetErrorString(fileNum))
End If
' Set report parameters
AcReqSetValueString fileNum, "RoiFileName", MyDetailRoi
AcReqSetValueString fileNum, "RoxFileName", DetailRox
AcReqSetValueString fileNum, "customers_creditrank", "C"
inDouble = 0.0345
inInteger = 321
inLong = 987654
inString = "Hello In"
inDate = CDate(#12/6/1967#)
inCurrency = 123324.567
fileNumber = AcReqReadFile(SourceRox)
If (AcReqGetError(fileNumber)) Then
fileNumber = AcReqReadFile(MyTypesRov)
If (AcReqGetError(fileNumber)) Then
MsgBox (AcReqGetErrorString(fileNumber))
End If
fileNumber = AcReqReadFile(DetailRox)
CurrentGroup = AcReqGetFirstGroup(fileNumber)
Do While (CurrentGroup <> "")
CurrentParameter = AcReqGetFirstParameter(fileNumber, CurrentGroup)
Do While (CurrentParameter <> "")
' Specify where the report server should generate the .roi
AcReqSetValueString fileNumber, RoiParmName, rsRoi
AcReqSetValueString fileNumber, RoxParmName, rsRox
' Open the parameter values file to access the parameter definitions
fileNum = AcReqReadFile( fileName )
Printing a report
This code segment shows how to print the report the previous example
generated:
void CActReqDlg::OnPrint()
{
int ret;
// Set a pointer to the End User Desktop
AcReqSetEUDTPath ( szEUDT );
// Set a pointer to the default printer
AcReqSetDefaultPrinter( );
// Uncomment this line if you want to set the number of copies printed
//AcReqSetPrinterNumberCopies( 1 );
// Print the myDetail.roi (this code assumes the report has already been
// generated)
ret = AcReqPrintReport(szMyDetailRoi, AC_REQ_PRINT);
}
// Open the parameter definition file from the report executable file
fileNumber = AcReqReadFile( szDetailRox );
// Get the first parameter group defined for that report
CurrentGroup = AcReqGetFirstGroup(fileNumber);
while (*(((char*)CurrentGroup)+1))
{
// Get the first parameter the parameter group contains
CurrentParameter = AcReqGetFirstParameter(fileNumber, (char*)
CurrentGroup);
while (*(((char*)CurrentParameter)+1))
{
// Find the alias the devleoper set for that parameter
Alias = ReqGetAlias(fileNumber, (char*) CurrentParameter);
// Find if the parameter is required
Required = AcReqGetRequired(fileNumber, (char*) CurrentParameter);
// Find if the parameter is marked as hidden
Hidden = AcReqGetHidden(fileNumber, (char*) CurrentParameter);
// Find if the parameter has been marked with HideText
HideText = AcReqGetHideText(fileNumber, (char*) CurrentParameter);
// Find if the parameter is ad hoc
Adhoc = AcReqGetAdhoc(fileNumber, (char*) CurrentParameter);
// Get the parameter type
ParmType = AcReqGetParmType(fileNumber, (char*) CurrentParameter);
}
// Free the BSTRs
SysFreeString(CurrentGroup);
// Get the next parameter group for the report
CurrentGroup = AcReqGetNextGroup(fileNumber);
}
// Close the file
AcReqCloseFile (fileNumber);
}
// Open the parameter definition file from the report executable file
// Check for errors
fileNumber = AcReqReadFile( szSourceRox );
if ( AcReqGetError( fileNumber ) )
AfxMessageBox( (char*)AcReqGetErrorStr( fileNumber ) );
// Open the parameter file you created and check for errors
fileNumber = AcReqReadFile( szMyTypesRov );
if (AcReqGetError(fileNumber))
AfxMessageBox( (char*) AcReqGetErrorStr(fileNumber) );
// Find all the parameter values. These should match the ones set above
outCurrency.int64 = AcReqGetValueCurrency(fileNumber, "aCurrency");
outDate = AcReqGetValueDate(fileNumber, "aDate");
outDouble = AcReqGetValueDouble(fileNumber, "aDouble");
outInteger = AcReqGetValueInteger(fileNumber, "aInteger");
outString = AcReqGetValueString(fileNumber, "aString");
// convert the outCurrency value to Currency and the outDate value to Date
oleCurrency = outCurrency;
oleDate = outDate;
This reference alphabetically lists the functions in the Requester API. For a
conceptual discussion of the Requester API, see Chapter 21, “Requester API
user guide.”
AcReqCloseFile
Closes an open parameter values (.rov) or a report executable (.rox) file.
Syntax Basic: Sub AcReqCloseFile( fileNumber As Long )
C/C++: void AcReqCloseFile( long fileNumber )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
Description Use AcReqCloseFile to close an open .rov or .rox file when it is not needed. For
example, you can close this file and free up memory after you finish setting
and writing parameter values to a new .rov file.
AcReqConnect
Connects to the specified server.
Syntax Basic: Function AcReqConnect( server As String, username As String,
password As String ) As Long
C/C++: long AcReqConnect( LPCSTR server, LPCSTR username, LPCSTR
password )
Parameter server
The name of the iServer to which to connect.
username
The user name to use to log in to iServer.
password
The user password to use to log in to iServer.
Description To access files and generate reports on iServer, you must call AcReqConnect to
connect to iServer. Once your program establishes a connection to iServer, you
can call any of the Requester API functions to access .rov, .rox, or .roi files on
iServer.
When your program has finished executing tasks on iServer, call
AcReqDisconnect to disconnect from iServer.
Returns A number indicating the connection handle.
-1 if the connection failed.
AcReqDisconnect
Disconnects from the specified server.
Syntax Basic: Sub AcReqDisconnect( connectionHandle As Long )
C/C++: VBBOOL AcReqDisconnect( long connectionHandle )
Parameter connectionHandle
The handle to the connection to close. This value is returned by AcReqConnect
when a connection to iServer is established.
Description When your program has finished executing tasks on iServer, call
AcReqDisconnect to disconnect from iServer. Call AcReqDisconnect before
AcReqUninitialize, which clears the Requester API from memory.
AcReqGenerateReport
Generates a report (.roi) from a report executable (.rox) or a parameter values
(.rov) file.
Syntax Basic: Function AcReqGenerateReport( filename As String, options As Long,
fileNumber As Long ) As Long
C/C++: long AcReqGenerateReport( LPCSTR filename, long options, long
fileNumber)
Parameter filename
The name of the .rox or .rov file to use to generate the report. Specify the full
path name if the file is not in the current directory.
If the file resides on a server, use the following format:
rotp:[//<server>]/<path>/<filename>[;<version>]
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, logically add them using
the plus (+) character. The following table lists and describes the constants.
Option Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to generate the
report. AC_REQ_LAUNCH_ALWAYS
and AC_REQ_LOCAL are mutually
exclusive.
AC_REQ_LOCAL Generates the report in the current
instance of e.Report Designer, e.Report
Designer Professional, or End User
Desktop. AC_REQ_LAUNCH_ALWAYS
and AC_REQ_LOCAL are mutually
exclusive.
AC_REQ_GENERATE Generates the report.
AC_REQ_VIEW Displays the generated report.
AC_REQ_PRINT Prints the generated report.
AC_REQ_ASYNC Runs this process asynchronously. The
function returns immediately and the
report generates in the background.
AC_REQ_HIDE Does not display the End User Desktop
application while it generates the report.
AC_REQ_RETURN_HANDLE Returns a handle to the synchronous
report generation request.
AC_REQ_STAY_OPEN Keeps the End User Desktop application
open after it generates the report. This
option is ignored if the report is generated
in the current instance of the End User
Desktop.
AC_REQ_SHOW_PROG_WND Displays the progress window of the End
User Desktop, e.Report Designer, or
e.Report Designer Professional while a
report generates.
AC_REQ_REPLACE Overwrites the latest report. When this
option is omitted, the report is created
with a new version number.
AC_REQ_USE_HANDLE Reserved.
Scope of options
The following table shows which options apply to reports generated locally or
on iServer and launched from either local or server applications.
If you do not specify any generation options, Actuate does the following by
default:
■ Generates the report with the current instance of the End User Desktop
application. If an End User Desktop application is not running, Actuate
attempts to launch a new instance, but only if you specified the location
with the AcReqSetEUDTPath function.
■ Runs the process synchronously. The function returns after the report is
generated.
■ Displays the End User Desktop application as it generates the report only if
the report is local.
fileNumber
If generating a report from an .rov file, enter 0. If generating a report from an
.rox file, enter the file number AcReqReadFile returned.
The following examples show how to specify arguments for
AcReqGenerateReport:
AcReqGenerateReport( "Detail.rov", AC_REQ_VIEW, 0 )
AcReqGenerateReport( "Detail.rov", AC_REQ_PRINT+AC_REQ_HIDE, 0)
AcReqGenerateReport( "Detail.rox", AC_REQ_LOCAL, fileNum )
The first call passes the name of a parameter file, the constant representing the
message to display the generated report, and zero to generate a report from
the parameter file. The second call is the same as the first except it passes two
constants that represent a message to generate and print the generated report
without displaying the End User Desktop. The third call passes an executable
file, a constant that represents a message to generate the report in the current
instance of e.Report Designer, e.Report Designer Professional or End User
Desktop, and the file number AcReqReadFile returned.
The following call generates the report on iServer with a stored file:
rsMyRov = "rotp://" + RotpHost + RotpFolder + "/" + "mydetail" + ".rov"
requestHandle = AcReqGenerateReport(rsMyRov, AC_REQ_GENERATE, 0)
The following call passes an executable file, a constant that represents a
message to return a handle to the report generation request, and the file
number AcReqReadFile returned. Requests must be run synchronously:
requestHandle = AcReqGenerateReport("rotp://Rs/Test/Forecast.rox",
AC_REQ_RETURN_ HANDLE, fileNum)
Description Use AcReqGenerateReport to generate a report based on parameter values
specified in an .rov or .rox file. Use this function to incorporate report
generation in your application. This capability is useful for batch report
creation.
To generate a report from an .rov file, Actuate runs the .rox file associated with
the .rov file you specify. It looks for the .rox file in the same directory where the
.rov file resides. If the .rox file is not in the same directory as the .rov file,
Actuate displays “Can’t access <file name>.rox” and displays an open file
dialog which you can use to find the .rox file.
To run a report in batch mode, specify the .rox file programmatically. To do so,
set the .rox file name parameter, represented by the constant, AC_REQ_ROX,
to the name of the .rox to use before writing the parameter values to a new .rov
file. The .rox file name is a hidden parameter that can only be set
programmatically, it does not appear in the Requester dialog. To set the .rox
file name parameter, use AcReqSetValueString as the following example
shows:
AcReqSetValueString( fileNum, AC_REQ_ROX, "C:\Test\Myreport.rox" )
If the .rox you want to run is in the same directory as the .rov file, you do not
have to set the .rox file name parameter.
By default, the .roi file that AcReqGenerateReport creates has the same root
name as the .rox file used to create the report, but you can change the .roi file
name with AcReqSetValueString. For more information, see
“AcReqSetValueString,” later in this chapter.
Returns Use the AcReqGetError function to check for errors for reports generated
asynchronously. For reports generated synchronously, the return value from
AcReqGenerateReport indicates the result of the report execution and any
error codes as the following table shows.
Report
Return value generation mode Indication
0 Report generated Report executed successfully on a
asynchronously local client.
1 to 1023 Report generated Report execution failed.
asynchronously The return value indicates the error
code. This method returns the same
error codes as AcReqGetError. For
more information, see
“AcReqGetError.”
1024 or greater Report generated Report executed successfully on
asynchronously iServer. The return value is a request
handle that can be used to get more
information about the report, such
as the report version number.
0 or less than 0 Report generated Report executed successfully on
synchronously iServer.
greater than 0 Report generated Report execution failed. To get an
synchronously error number, call AcReqGetError
using the return value as an input
parameter. To get the error
description, call
AcReqGetErrorString or
AcWReqGetErrorString using the
return value as an input parameter.
AcReqGetAdhoc
Returns True or False, depending on whether the parameter is an ad hoc
parameter or not.
Syntax Basic: Function AcReqGetAdhoc( fileNumber As Long, parmName As String )
As Boolean
C/C++: VBBOOL AcReqGetAdhoc( long fileNumber, LPCSTR ParmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose ad hoc attribute you want. If you do not
know the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetAdhoc to find out if a parameter was designed as an ad hoc
parameter. An ad hoc parameter accepts a conditional expression that extends
the Where clause of a query when the report is generated.
Returns True if the parameter is an ad hoc parameter, False otherwise.
AcReqGetAlias
Returns the alternate name of the specified parameter.
Syntax Basic: Function AcReqGetAlias( fileNumber As Long, parmName As String )
As String
C/C++: BSTR AcReqGetAlias( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose alias you want. If you do not know the
names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetAlias to get the alias of a parameter. When defining parameters,
you use aliases to create descriptive prompts that appear in the Requester
dialog. For example, Customer Name is more descriptive than Cust_Name.
If you are building a custom requestor interface in a Visual Basic form, for
example, you can use the alias that AcReqGetAlias returns to create an
interface similar to the Requester dialog in e.Report Designer or e.Report
Designer Professional.
Returns The alias of the specified parameter.
An empty string if there is no alias or if an error occurred.
AcReqGetDefaultValueCurrency
Returns the default value of the specified parameter as a currency.
Syntax Basic: Function AcReqGetDefaultValueCurrency( fileNumber As Long,
parmName As String ) As Currency
C/C++: REQCYTYPE AcReqGetDefaultValueCurrency( long fileNumber,
LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueCurrency to get the default value of a parameter as
a currency. The programmer defines the default value at design time. This
value is used if the user does not supply a value when the report runs.
Required parameters always have default values. A default value is constant
and independent of the value a user sets through the Requester.
When calling AcReqGetDefaultValueCurrency, the parameter you specify as
an argument must be of type Currency. If you specify a parameter of any other
type, AcReqGetDefaultValueCurrency returns the default value for that type.
To pass an argument of any type, use AcReqGetDefaultValueStr. The value
AcReqGetDefaultValueStr always returns a string.
Use AcReqGetParmType to check the data type of a parameter.
AcReqGetDefaultValueDate
Returns the default value of the specified parameter as a date.
Syntax Basic: Function AcReqGetDefaultValueDate( fileNumber As Long, parmName
As String ) As Date
C/C++: double AcReqGetDefaultValueDate( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueDate to get the default value of a parameter as a
date. The programmer defines the default value at design time. This value is
used if the user does not supply a value when the report runs. Required
parameters always have default values. A default value is constant and
independent of the value a user sets through the Requester.
When calling AcReqGetDefaultValueDate, the parameter you specify as an
argument must be of type Date. If you specify a parameter of any other type,
AcReqGetDefaultValueDate returns the default value for that type. To pass an
argument of any type, use AcReqGetDefaultValueStr. The value
AcReqGetDefaultValueStr returns is always a string.
Use AcReqGetParmType to check the data type of a parameter.
AcReqGetDefaultValueDouble
Returns the default value of the specified parameter as a double.
Syntax Basic: Function AcReqGetDefaultValueDouble( fileNumber As Long,
parmName As String ) As Double
C/C++: double AcReqGetDefaultValueDouble( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueDouble to get the default value of a parameter as a
double. The programmer defines the default value at design time. This value is
used if the user does not supply a value when the report runs. Required
parameters always have default values. A default value is constant and
independent of the value a user sets through the Requester.
When calling AcReqGetDefaultValueDouble, the parameter you specify as an
argument must be of type Double. If you specify a parameter of any other
AcReqGetDefaultValueInteger
Returns the default value of the specified parameter as an integer.
Syntax Basic: Function AcReqGetDefaultValueInteger( fileNumber As Long,
parmName As String ) As Integer
C/C++: long AcReqGetDefaultValueInteger( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueInteger to get the default value of a parameter as
an integer. The programmer defines the default value at design time. This
value is used if the user does not supply a value when the report runs.
Required parameters always have default values. A default value is constant
and independent of the value a user sets through the Requester.
When calling AcReqGetDefaultValueInteger, the parameter you specify as an
argument must be of type Integer. If you specify a parameter of any other type,
AcReqGetDefaultValueInteger returns the default value for that type. To pass
an argument of any type, use AcReqGetDefaultValueStr. The value
AcReqGetDefaultValueStr returns is always a string.
Use AcReqGetParmType to check the data type of a parameter.
Returns The default value of the specified parameter as an integer.
AcReqGetDefaultValueStr
Returns the default value of the specified parameter as a string.
Syntax Basic: Function AcReqGetDefaultValueStr( fileNumber As Long, parmName
As String ) As String
C/C++: BSTR AcReqGetDefaultValueStr( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueStr to get the default value of any parameter as a
string. The parameter you specify as an argument can be of any type. To get
the default value as the type with which the parameter was declared, use type-
specific functions such as AcReqGetDefaultValueInteger or
AcReqGetDefaultValueCurrency.
The programmer defines the default value at design time. This value is used if
the user does not supply a value when the report runs. Required parameters
always have default values. A default value is constant and independent of the
value a user sets through the Requester.
Returns The default value of the specified parameter as a string.
AcReqGetDefaultValueString
Returns the default value of the specified parameter as a string.
Syntax Basic: Function AcReqGetDefaultValueString( fileNumber As Long,
parmName As String ) As String
C/C++: BSTR AcReqGetDefaultValueString( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose default value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetDefaultValueString to get the default value of a parameter as a
string. The programmer defines the default value at design time. This value is
used if the user does not supply a value when the report runs. Required
parameters always have default values. A default value is constant and
independent of the value a user sets through the Requester.
When calling AcReqGetDefaultValueString, the parameter you specify as an
argument must be of type String. If you specify a parameter of any other type,
AcReqGetDefaultValueString returns the default value for that type. To pass
an argument of any type, use AcReqGetDefaultValueStr. The value
AcReqGetDefaultValueStr returns is always a string.
Use AcReqGetParmType to check the data type of a parameter.
Returns The default value of the specified parameter as a string.
AcReqGetError
Returns the error number of the last error that occurred during an API
function call.
Syntax To check errors for an AcReqGenerateReport function call, use:
Basic: Function AcReqGetError( returnValue As Long ) As Long
C/C++: long AcReqGetError( long returnValue )
To check errors for other API function calls, use:
Basic: Function AcReqGetError( fileNumber As Long ) As Long
C/C++: long AcReqGetError( long fileNumber )
Parameter returnValue
The return value from the AcReqGenerateReport function call.
fileNumber
The file number of an .rov or .rox file you opened with AcReqReadFile.
Description Use AcReqGetError to check for error conditions and return the error number.
The following table lists the error numbers that AcReqGetError returns. To get
the error string, use AcReqGetErrorString.
Example The following example shows you how to handle errors from
AcReqGenerateReport.
long ret = AcReqGenerateReport ( )
if (ret > 0 And < 1024)
long error = AcReqGetError (ret)
AcReqGetErrorString
Returns a string that describes the last error that occurred during an API
function call.
Syntax Basic: Function AcReqGetErrorString( fileNumber As Long ) As String
C/C++: BSTR AcReqGetErrorString( long fileNumber )
Parameter fileNumber
The file number of an .rov or .rox file you opened with AcReqReadFile.
Description Use AcReqGetErrorString to check for error conditions and retrieve a
description of the error. To get the error number, use AcReqGetError. For a list
of the error strings that AcReqGetErrorString can return, see AcReqGetError.
Returns The error string of the last error.
AcReqGetFirstGroup
Returns the name of the first parameter group in the specified parameter value
(.rov) file or parameter definition section of the specified .rox file.
Syntax Basic: Function AcReqGetFirstGroup( fileNumber As Long ) As String
C/C++: BSTR AcReqGetFirstGroup( long fileNumber )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
Description Use AcReqGetFirstGroup in conjunction with AcReqGetNextGroup,
AcReqGetFirstParameter, and AcReqGetNextParameter to get information
about the organization of parameters in a specified .rov or .rox file. If you are
building a custom requestor interface in a Visual Basic form, for example, you
can use the strings that these functions return to create a structure similar to
the Requester interface in e.Report Designer or e.Report Designer Professional.
You can organize parameters into groups for ease of use. For example,
CustomerName, CustomerPhone, and Credit_Rank might be parameters in a
Customer parameters group, and City and State might be parameters in an
Office parameters group.
If there are no parameter groups, the parameters have an empty string (“ “) as
their group name.
Returns The name of the first parameter group in the specified .rov or .rox file, if a
group exists.
An empty string if there are no groups or if an error occurred.
AcReqGetFirstParameter
Returns the name of the first parameter in the specified parameter group.
Syntax Basic: Function AcReqGetFirstParameter( fileNumber As Long, parmGroup
As String ) As String
C/C++: BSTR AcReqGetFirstParameter( long fileNumber, LPCSTR
parmGroupName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmGroup
The name of the parameter group in which to find the first parameter. If you
do not know the name of parameter groups, use AcReqGetFirstGroup and
AcReqGetNextGroup to get the group names. To get all parameters that
belong in any group, specify an empty string for this argument.
Description Use AcReqGetFirstParameter in conjunction with AcReqGetNextParameter,
AcReqGetFirstGroup, and AcReqGetNextGroup to get information about the
organization of parameters in a specified .rov or .rox file. If you are building a
custom requestor interface in a Visual Basic form, for example, you can use the
strings that these functions return to create a structure similar to the Requester
interface in e.Report Designer or e.Report Designer Professional.
Returns The name of the first parameter in the specified parameter group.
An empty string if there are no parameters or if an error occurred.
AcReqGetHidden
Returns True or False, depending on whether or not the parameter is defined
as hidden.
Syntax Basic: Function AcReqGetHidden( fileNumber As Long, parmName As String )
As Boolean
C/C++: VBBOOL AcReqGetHidden( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose hidden attribute you want. If you do not
know the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetHidden to find out if a parameter is defined as hidden. If a
parameter is hidden, you can only set the parameter value programmatically,
users cannot set the value of through the Requester. For example, define a path
name parameter as hidden to prevent users from changing this value.
Returns True if the parameter is defined as hidden, False otherwise.
AcReqGetHideText
Returns True or False, depending on whether the parameter is defined to
display asterisks or actual text as users type the value in the Requester.
Syntax Basic: Function AcReqGetHideText( fileNumber As Long, parmName As
String ) As Boolean
C/C++: VBBOOL AcReqGetHideText( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose hide text attribute you want. If you do not
know the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetHideText to find out if a parameter is defined to display
asterisks or actual text as users type the value in the Requester. If the hide text
attribute is True, Actuate displays asterisks as users type the parameter value.
Returns True if the parameter was defined to display asterisks as users type the value.
False if the parameter was defined to display the text that users type.
AcReqGetNextGroup
Returns the name of the next parameter group in the specified .rov file or
parameter definition section of the specified .rox file.
Syntax Basic: Function AcReqGetNextGroup( fileNumber As Long ) As String
C/C++: BSTR AcReqGetNextGroup( long fileNumber )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
Description Use AcReqGetNextGroup in conjunction with AcReqGetFirstGroup,
AcReqGetFirstParameter, and AcReqGetNextParameter to get information
about the organization of parameters in a specified .rov or .rox file. You must
call AcReqGetFirstGroup before calling AcReqGetNextGroup. To get the
names of all parameter groups, call AcReqGetNextGroup until it returns an
empty string. An empty string indicates that the function has returned the last
parameter group.
If you are building a custom requester interface in a Visual Basic form, for
example, you can use the strings that these functions return to create a
structure similar to the Requester interface in e.Report Designer or e.Report
Designer Professional.
You can organize parameters into groups for ease of use. For example,
CustomerName, CustomerPhone, and Credit_Rank might be parameters in a
Customer parameters group, and City and State might be parameters in an
Office parameters group.
Returns The name of the next group in the specified .rov or .rox file, if one exists.
An empty string if there are no more groups or if an error occurred.
AcReqGetNextParameter
Returns the name of the next parameter in the specified parameter group.
Syntax Basic: Function AcReqGetNextParameter( fileNumber As Long, parmGroup
As String ) As String
C/C++: BSTR AcReqGetNextParameter( long fileNumber, LPCSTR
parmGroup)
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmGroup
The name of the parameter group in which to find the next parameter. If you
do not know the name of parameter groups, use AcReqGetFirstGroup and
AcReqGetNextGroup to get the group names. To get all parameters that
belong in any group, specify an empty string for this argument.
Description Use AcReqGetNextParameter in conjunction with AcReqGetFirstParameter,
AcReqGetFirstGroup, and AcReqGetNextGroup to get information about the
organization of parameters in a specified .rov or .rox file. You must call
AcReqGetFirstParameter before calling AcReqGetNextParameter. To get the
names of all parameters in a group, call AcReqGetNextParameter until it
returns an empty string. An empty string indicates that the function has
returned the last parameter.
If you are building a custom requestor interface in a Visual Basic form, for
example, you can use the strings that these functions return to create a
structure similar to the Requester interface in e.Report Designer or e.Report
Designer Professional.
Returns The name of the next parameter in the specified parameter group.
An empty string if there are no more parameters or if an error occurred.
AcReqGetParmType
Returns the data type of the specified parameter as a string.
Syntax Basic: Function AcReqGetParmType( fileNumber As Long, parmName As
String ) As String
C/C++: BSTR AcReqGetParmType( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose data type you want. If you do not know the
names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetParmType to find out the parameter’s data type. You can use
this information to determine how to set a parameter value. You can also use
this information to determine which function to use to get a parameter’s
default value or its current value.
You set parameter values with functions such as AcReqSetValueDate,
AcReqSetValueString, and so on. You get the default values for parameters
with functions such as AcReqGetDefaultValueDate,
AcReqGetDefaultValueString, and so on. You get a parameter’s current value
with functions such as AcReqGetValueDate, AcReqGetValueString, and so on.
Returns The data type of the specified parameter as a string.
AcReqGetReportVersion
Returns the version of the report AcReqGenerateReport generated.
Syntax Basic: Function AcReqGetReportVersion( requestHandle As Long ) As Long
C/C++: long AcReqGetReportVersion( long requestHandle )
Parameter requestHandle
AcReqGenerateReport returns the request handle in its return value. This
value is greater than or equal to 1024.
AcReqGetRequired
Returns True or False, depending on whether or not the parameter is defined
as required.
Syntax Basic: Function AcReqGetRequired( fileNumber As Long, parmName As
String ) As Boolean
C/C++: VBBOOL AcReqGetRequired( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose required attribute you want. If you do not
know the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetRequired to find out if a parameter was defined as required or
optional. If a parameter is required, Actuate generates the report only if a
value for the parameter is provided.
Use the boolean value that AcReqGetRequired returns to determine if you
need to set a parameter value before generating a report. You set parameter
values with functions such as AcReqSetValueString, AcReqSetValueDate, and
so on.
Returns True if the parameter is required to generate the report, False if the parameter
is optional.
AcReqGetType
Returns the data type of the specified parameter as an enumeration.
Syntax Basic: Function AcReqGetType( fileNumber As Long, parmName As String )
As Long
C/C++: long AcReqGetType( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose data type you want. If you do not know the
names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetType to find out the parameter’s data type. This method returns
an enumeration of the data type rather than a text string. You can use the data
type to determine how to set a parameter value. You can also use this
information to determine which function to use to get a parameter’s default
value or its current value.
You get the default values for parameters with AcReqGetDefaultValueDate,
AcReqGetDefaultValueString, and so on. You set parameter values with
AcReqSetValueDate, AcReqSetValueString, and so on. You get a parameter’s
current value with AcReqGetValueDate, AcReqGetValueString, and so on.
Returns An enumeration of the data type as the following table shows.
AcReqGetValueCurrency
Returns the current value of the specified parameter as a currency.
Syntax Basic: Function AcReqGetValueCurrency( fileNumber As Long, parmName As
String ) As Currency
C/C++: REQCYTYPE AcReqGetValueCurrency( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueCurrency to get the current value of a parameter as a
currency. The current value is the value last entered in the .rov file. If you are
accessing an .rox file, the current value is the default value defined at design
time.
When calling AcReqGetValueCurrency, the parameter you specify as an
argument must be of type Currency. If you specify a parameter of any other
type, AcReqGetValueCurrency returns the default value for that type. To pass
an argument of any type, use AcReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcReqGetParmType to check the data type of a parameter.
In C/C++, the structure REQCYTYPE, stores up to 64 bits. If you need to
retrieve currency values that require a 96-bit structure, use the
AcReqGetValueString function to return the value. Then, convert the string
value to a currency value within your application program. If you call
AcReqGetValueCurrency to return a currency value larger than 64 bits, the
GetError function returns an error message number.
Returns The current value of the specified parameter as a currency.
AcReqGetValueDate
Returns the current value of the specified parameter as a date.
Syntax Basic: Function AcReqGetValueDate( fileNumber As Long, parmName As
String ) As Date
C/C++: double AcReqGetValueDate( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueDate to get the current value of a parameter as a date. The
current value is the value last entered in the .rov file. If you are accessing an
.rox file, the current value is the default value defined at design time.
When calling AcReqGetValueDate, the parameter you specify as an argument
must be of type Date. If you specify a parameter of any other type,
AcReqGetValueDate returns the default value for that type. To pass an
argument of any type, use AcReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcReqGetParmType to check the data type of a parameter.
Returns The current value of the specified parameter as a date.
Example The following example shows how to work with dates expressed as C++
doubles:
int fileNumber;
double inDate, outDate;
COleDateTime oleDate( 1967, 12, 6, 0, 0, 0 ); // y m d h m s
inDate = oleDate;
fileNumber = AcReqReadFile( szSourceRox );
outDate = AcReqGetValueDate(fileNumber, "aDate");
oleDate = outDate;
AcReqSetValueDate( fileNumber, "aDate", inDate );
AcReqCloseFile( fileNumber );
AcReqGetValueDouble
Returns the current value of the specified parameter as a double.
Syntax Basic: Function AcReqGetValueDouble( fileNumber As Long, parmName As
String ) As Double
C/C++: double AcReqGetValueDouble( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueDouble to get the current value of a parameter as a
double. The current value is the value last entered in the .rov file. If you are
accessing an .rox file, the current value is the default value defined by the
programmer at design time.
When calling AcReqGetValueDouble, the parameter you specify as an
argument must be of type Double. If you specify a parameter of any other
type, AcReqGetValueDouble returns the default value for that type. To pass an
argument of any type, use AcReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcReqGetParmType to check the data type of a parameter.
Returns The current value of the specified parameter as a double.
AcReqGetValueInteger
Returns the current value of the specified parameter as an integer.
Syntax Basic: Function AcReqGetValueInteger( fileNumber As Long, parmName As
String ) As Integer
C/C++: long AcReqGetValueInteger( long fileName, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueInteger to get the current value of a parameter as an
integer. The current value is the value last entered in the .rov file. If you are
accessing an .rox file, the current value is the default value defined by the
programmer at design time.
When calling AcReqGetValueInteger, the parameter you specify as an
argument must be of type Integer. If you specify a parameter of any other type,
AcReqGetValueInteger returns the default value for that type. To pass an
argument of any type, use AcReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcReqGetParmType to check the data type of a parameter.
Returns The current value of the specified parameter as an integer.
AcReqGetValueStr
Returns the current value of the specified parameter as a string.
Syntax Basic: Function AcReqGetValueStr( fileNumber As Long, parmName
As String ) As String
C/C++: BSTR AcReqGetValueStr( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueStr to get the current value of a parameter as a string. The
current value is the value last entered in the .rov file. If you are accessing an
.rox file, the current value is the default value defined by the programmer at
design time.
Use AcReqGetValueStr to get the current value of any parameter as a string.
The parameter you specify as an argument can be of any type. To get the
current value as the type with which the parameter was declared, use type-
specific functions such as AcReqGetValueInteger or AcReqGetValueCurrency.
Returns The current value of the specified parameter as a string.
AcReqGetValueString
Returns the current value of the specified parameter as a string.
Syntax Basic: Function AcReqGetValueString( fileNumber As Long, parmName As
String ) As String
C/C++: BSTR AcReqGetValueString( long fileNumber, LPCSTR parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose current value you want. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqGetValueString to get the current value of a parameter as a string.
The current value is the value last entered in the .rov file. If you are accessing
an .rox file, the current value is the default value defined by the programmer
at design time.
AcReqGetVersionNumber
Returns Actuate requester API version information as a string.
Syntax Basic: Function AcReqGetVersionNumber( ) As String
C/C++: BSTR AcReqGetValueStr( )
Description Use AcReqGetVersionNumber to get the version information of the requester
API.
Returns Version information as a string in the following format:
r.v.m.p - nnnn
The following table describes the values in the string.
Number Description
r Release number
v Version number
m Maintenance version
p Patch number
nnnn Build number
AcReqHasDefaultValue
Returns True if a default value was assigned to a specified parameter.
Syntax Basic: Function AcReqHasDefaultValue( fileNumber As Long, parmName As
String ) As Boolean
C/C++: BSTR AcReqHasDefaultValue( long fileNumber, LPCSTR
parmName )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter with the default value you want. If you do not
know the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
Description Use AcReqHasDefaultValue to determine if a default value was assigned to a
parameter. The parameter you specify as an argument can be of any type.
AcReqGetValueInteger returns zero if no default value is set or if the default
value is set to zero. For this reason, always call AcReqHasDefaultValue to
determine whether a default value is set, then call AcReqGetValueInteger to
the value.
Returns True if a default value was assigned, False otherwise.
AcReqInitialize
Initializes the DLLs. This must be the first function you call.
Syntax Basic: Function AcReqInitialize( ) As Long
C/C++: long AcReqInitialize( )
Description This function initializes the DLLs and prepares the Requester API for use in
your program. When you no longer need to use the Requester API, call
AcReqUnInitialize to close the library and free resources the API uses.
Returns A handle to the initialized session.
AcReqPrintReport
Prints the specified report (.roi).
Syntax Basic: Function AcReqPrintReport( filename As String, options As Long ) As
Long
C/C++: long AcReqPrintReport( LPCSTR fileName, long options )
Parameter filename
The name of the report (.roi) to print. Specify the full path name if the file is not
in the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, use the plus (+) character
between the options. The following table lists and describes the constants.
Constant Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to print the report.
AC_REQ_PRINT Prints the generated report.
AC_REQ_ASYNC Runs this process asynchronously. The
function returns immediately and the
report prints in the background. If not
specified, the function returns after the
report prints.
AC_REQ_HIDE Does not display the End User Desktop
application while it prints the report.
AC_REQ_STAY_OPEN Keeps the End User Desktop application
open after it prints the report. This option
is ignored if the report is printed in the
current instance of the End User Desktop.
AcReqReadFile
Opens a parameter value (.rov) file or a report executable (.rox) file.
Syntax Basic: Function AcReqReadFile( filename As String ) As Long
C/C++: long AcReqReadFile( LPCSTR fileName )
Parameter filename
The name of the .rov or .rox file to open. Specify the full path name if the file is
not in the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
Description Use AcReqReadFile to open an .rov or .rox file to change or get information
about parameter values before generating a report. The .rov contains
parameter values that users set when they run a report. The .rox file contains
the parameter definitions. If you open an .rox, the default values assigned to
the parameters at design time are read into memory.
You can call AcReqReadFile multiple times to open multiple files. Each file is
assigned a unique file number. Keep track of the file number—many API
functions need this number as an argument.
Returns The file number of the open file.
-1 if the user does not have permission to open the file.
AcReqReportStatus
Returns the status of a specified report generation request on iServer.
Syntax Basic: Sub AcReqReportStatus( RequestHandle As Long ) As Integer
C/C++: UNSIGNED SHORT AcReqReportStatus( long RequestHandle )
Parameter RequestHandle
The value that identifies a specific report generation request.
AcReqGenerateReport returns this value when a request is issued successfully
on a server. Only values greater than 1024 are valid.
Description Call AcReqReportStatus to determine the status of a report-generation request
on iServer. For example, getting the generation status is useful before calling
AcReqViewReport to display the completed report. The status information is
also useful in error-handling routines.
Returns One of the values as the following table shows.
Value Description
0 The generation process is complete.
1 The generation process is active.
2 An error occurred during report generation.
3 An unknown, non-generation error occurred. For
example, the argument passed to
AcReqReportStatus is invalid.
AcReqSelectClient
Select the client product to use for client-side viewing, printing, and running
reports.
Syntax Basic: Function AcReqSelectClient( clientCode As Integer, installDir As
String ) As Boolean
C/C++: VBBOOL AcReqSelectClient( int clientCode, const char *installDir )
Parameter clientCode
The client code as the following table shows.
installDir
The directory where Actuate is installed. You must use the standard product
search extension directory names because Actuate uses these names to locate
the proper product DLL The following table shows the standard Actuate
search extension directory names.
The following example shows one way to specify installDir for e.Report
Designer Professional:
C:\Program Files\Actuate7\ErdPro
Description Use this function to select the Actuate client product to use for client-side
viewing, printing and running reports. Not all products can perform all
operations.
AcReqSelectClient supersedes AcReqSetEUDTPath. You must call this
function before using the file cache functions or the AFC installation functions.
AcReqSetDefaultPrinter
Reverts to the system’s default printer for the next print job.
Syntax Basic: Sub AcReqSetDefaultPrinter( )
C/C++: void AcReqSetDefaultPrinter( )
Description Use AcReqSetDefaultPrinter to revert to the system’s default printer after
sending a print job to another printer specified with AcReqSetPrinterName.
AcReqSetEUDTPath
Specifies the location of the End User Desktop application to use for report
generation or the location of the Viewer application to use for report viewing.
Syntax Basic: Sub AcReqSetEUDTPath( pathName As String )
C/C++: void AcReqSetEUDTPath( LPCSTR pathName )
Parameter pathName
The location of the End User Desktop or Viewer application to run.
The following examples show how to specify the End User Desktop and
Viewer application to run:
AcReqSetEUDTPath( "C:\Program Files\Actuate7\Eudt\Bin\Runview.exe" )
AcReqSetEUDTPath( "C:\Program Files\Actuate7\Viewer\Bin\Viewer.exe" )
Description Use AcReqSetEUDTPath to specify the location of the End User Desktop to use
for report generation. If generating reports on iServer, do not set this path. Call
AcReqSetEUDTPath in the following situations:
■ If you run the End User Desktop remotely, for example, from a Visual Basic
application.
AcReqSetPrinterCollate
Specifies whether or not the printer collates multiple copies of a document.
Syntax Basic: Sub AcReqSetPrinterCollate( collate As Boolean )
C/C++: void AcReqSetPrinterCollate( VBBOOL collate )
Parameter collate
True collates multiple copies of a document.
Description Before sending a print job, use AcReqSetPrinterCollate to specify whether or
not to collate documents. To print a report, use AcReqPrintReport.
AcReqSetPrinterColor
Specifies if the report is printed in color.
Syntax Basic: Sub AcReqSetPrinterColor( color As Boolean )
C/C++: void AcReqSetPrinterColor( VBBOOL color )
Parameter color
True prints the report in color.
Description If printing to a color printer, use AcReqSetPrinterColor before sending a print
job to specify whether or not to print in color. To print a report, use
AcReqPrintReport.
AcReqSetPrinterDuplex
Specifies if the printer prints on both sides or one side of the paper.
Syntax Basic: Sub AcReqSetPrinterDuplex( duplex As Integer )
C/C++: void AcReqSetPrinterDuplex( short duplex )
Parameter duplex
The duplex mode. Specify one of the following integer values.
AcReqSetPrinterFormName
Specifies the paper size by type, for example, Letter, Legal, or Executive.
Syntax Basic: Sub AcReqSetPrinterFormName( formName As String )
C/C++: void AcReqSetPrinterFormName( LPCSTR formName )
Parameter formName
The type of paper, such as letter, legal, or others. Check your printer
documentation for valid settings.
Description Before sending a print job, use AcReqSetPrinterFormName to specify the
paper size by type. To specify the paper size using actual size dimensions, use
AcReqSetPrinterPaperSize. To print a report, use AcReqPrintReport.
AcReqSetPrinterName
Specifies the printer to use.
Syntax Basic: Sub AcReqSetPrinterName( printerName As String )
C/C++: void AcReqSetPrinterName( LPCSTR printerName )
Parameter printerName
The name of the printer to use.
Description Before sending a print job, use AcReqSetPrinterName to specify a printer other
than the default one. To revert to the system’s default printer after printing to
the printer you specify with this function, call AcReqSetDefaultPrinter. To
print a report, use AcReqPrintReport.
AcReqSetPrinterNumberCopies
Specifies the number of copies to print.
Syntax Basic: Sub AcReqSetPrinterNumberCopies( numCopies As Integer )
C/C++: void AcReqSetPrinterNumberCopies( short numCopies )
Parameter numCopies
The number of copies to print.
Description Before sending a print job, use AcReqSetPrinterNumberCopies to change the
default setting for number of copies to print. To collate multiple copies of a
document, use AcReqSetPrinterCollate. To print a report, use
AcReqPrintReport.
AcReqSetPrinterOrientation
Sets the printer’s page orientation to portrait or landscape.
Syntax Basic: Sub AcReqSetPrinterOrientation( orientation As Integer )
C/C++: void AcReqSetPrinterOrientation( short orientation )
Parameter orientation
1 for portrait, 2 for landscape.
Description Before sending a print job, use AcReqSetPrinterOrientation to specify a
different page orientation from the default one. To print a report, use
AcReqPrintReport.
AcReqSetPrinterPaperSize
Specifies the paper size.
Syntax Basic: Sub AcReqSetPrinterPaperSize( size As Integer, length As Integer,
width As Integer)
C/C++: void AcReqSetPrinterPaperSize( short size, short length, short width )
Parameter size
An enum value between 1 and 68. Each value represents a paper size. If you
set the size argument, set the length and width arguments to zero. The
following table lists the enum values for the size argument and the
corresponding paper sizes.
length, width
The physical length and width of the paper in tenths of a millimeter. If you set
the length and width arguments, set the size argument to zero. To convert
inches to tenths of a millimeter, multiply the number by 254. For example, to
specify a paper size of 8.5 by 11 inches, specify 2159 (8.5 * 254) for the width
argument, and 2794 (11 * 254) for the length argument.
Description Before sending a print job, use AcReqSetPrinterPaperSize to specify the paper
size on which to print. When working with a server running on a Windows
platform, you can specify either logical or physical paper size. On a UNIX
platform, you can only specify logical paper size. To print a report, use
AcReqPrintReport.
AcReqSetPrinterScale
Specifies the size of the image to print.
Syntax Basic: Sub AcReqSetPrinterScale( scale As Integer )
C/C++: void AcReqSetPrinterScale( short scale )
Parameter scale
The percentage of the original size at which to print. Check your printer
documentation for the valid range.
Description Before sending a print job, use AcReqSetPrinterScale to specify the size of the
image to print. To print a report, use AcReqPrintReport.
AcReqSetPrinterTray
Specifies the printer tray for the paper source.
Syntax Basic: Sub AcReqSetPrinterTray( tray as Short)
C/C++: void AcReqSetPrinterTray( short tray)
Parameter tray
An enum value indicating the printer tray. The following table lists the enum
values and the corresponding printer tray for the paper source. These values
are not the same across all printers. Refer to you printer documentation for
appropriate printer tray numbers.
Description Before sending a print job, use AcReqSetPrinterTray to specify the paper tray.
AcReqSetPrinterTray passes the tray number directly to the DEVMODE
structure’s dmDefaultSource member.
AcReqSetRequestPriority
Specifies the priority for report generation on iServer.
Syntax Basic: Sub AcReqSetRequestPriority( priority as Long)
C/C++: void AcReqSetRequestPriority( long priority )
Parameter priority
The priority for report generation: from 0 - 1000.
Description Before generating a report, call AcReqSetRequestPriority to specify the
priority level on iServer. A higher number indicates greater priority. iServer
can restrict the priority to the range permitted for the current user.
AcReqSetScopedParameterName
Specifies how parameter names are retrieved.
Syntax Basic: Sub AcReqSetScopedParameterName( fileNumber As Long,
scopedParam As Boolean )
C/C++: void AcReqSetScopedParameterName( Long fileNumber, VBBOOL
scopedParam )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
scopedParam
Determines the return type of the AcReqGetFirstParameter and
AcReqGetNextParameter methods. If True, the retrieved parameter names are
fully scoped. If False, the retrieved parameter names are not fully scoped. The
default value is False.
Description Call AcReqSetScopedParameterName to specify whether on not parameter
names are retrieved fully scoped. Call AcReqSetScopedParameterName
repeatedly to specify how parameter names are retrieved.
Example The following examples show how to specify whether or not parameter names
are retrieved fully scoped. In both examples, the parameter name is fully
scoped as NewReportApp::DataSource::param1.
In the following example, the value of CurrentParameter is
NewReportApp::DataSource::param1:
AcReqSetScopedParameterName( fileNumber, TRUE )
CurrentGroup = AcReqGetFirstGroup(fileNumber)
CurrentParameter = AcReqGetFirstParameter(fileNumber, CurrentGroup)
In the following example, the value of CurrentParameter is param1:
AcReqSetScopedParameterName( fileNumber, FALSE )
CurrentGroup = AcReqGetFirstGroup(fileNumber)
CurrentParameter = AcReqGetFirstParameter(fileNumber, CurrentGroup)
AcReqSetValueCurrency
Sets the value of the specified parameter as a currency.
Syntax Basic: Sub AcReqSetValueCurrency( fileNumber As Long, parmName As
String, value As Currency )
C/C++: void AcReqSetValueCurrency( long fileNumber, LPCSTR parmName,
REQCYTYPE value )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
value
The currency value to assign to the parameter.
Description Use AcReqSetValueCurrency to assign a currency value to a parameter. The
parameter whose value you want to set must be of type Currency. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
In C/C++, the structure REQCYTYPE, stores up to 64 bits. If you need to
assign a currency value to a parameter that requires a 96-bit structure, convert
the currency value to a string value, then call AcReqSetValueString to assign
the value. If you call AcReqSetValueCurrency to assign a currency value larger
than 64 bits, GetError returns an error number.
AcReqSetValueDate
Sets the value of the specified parameter as a date.
Syntax Basic: Sub AcReqSetValueDate( fileNumber As Long, parmName As String,
value As Date )
C/C++: void AcReqSetValueDate( long fileNumber, LPCSTR parmName,
double value )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
value
The date value to assign to the parameter. The date value is a floating point
number containing the number of days from midnight on December 30, 1899.
Hours are shown as a fraction of a day. For example, the value for December
30, 1899 is 0.0. The date value for January 1, 1900 at 6 A.M. is 2.25.
Description Use AcReqSetValueDate to assign a date value to a parameter. The parameter
whose value you want to set must be of type Date. Use AcReqGetParmType to
check the data type of a parameter before setting its value. Ensure that the date
value passed to AcReqSetValueDate is a floating point number expressed
using the format described for the value parameter. On Windows servers, you
can call the C++ function, COleDateTime, to convert the date for
AcReqSetValueDate.
Example The following example shows how to work with dates expressed as C++
doubles on Windows NT:
int fileNumber;
double inDate, outDate;
COleDateTime oleDate( 1967, 12, 6, 0, 0, 0 ); // y m d h m s
inDate = oleDate;
fileNumber = AcReqReadFile( szSourceRox );
outDate = AcReqGetDefaultValueDate(fileNumber, "aDate");
oleDate = outDate;
AcReqSetValueDate( fileNumber, "aDate", inDate );
AcReqCloseFile( fileNumber );
AcReqSetValueDouble
Sets the value of the specified parameter as a double.
Syntax Basic: Sub AcReqSetValueDouble( fileNumber As Long, parmName As String,
value As Double )
C/C++: void AcReqSetValueDouble( long fileNumber, LPCSTR parmName,
double value )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
value
The double value to assign to the parameter.
Description Use AcReqSetValueDouble to assign a double value to a parameter. The
parameter whose value you want to set must be of type Double. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
AcReqSetValueInteger
Sets the value of the specified parameter as an integer.
Syntax Basic: Sub AcReqSetValueInteger( fileNumber As Long, parmName As String,
value As Integer )
C/C++: void AcReqSetValueInteger( long fileNumber, LPCSTR parmName,
long value )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
parmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
value
The integer value to assign to the parameter.
Description Use AcReqSetValueInteger to assign an integer value to a parameter. The
parameter whose value you want to set must be of type Integer. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
AcReqSetValueString
Sets the value of the specified parameter as a string.
Syntax Basic: Sub AcReqSetValueString( fileNumber As Long, parmName As String,
value As String )
parmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcReqGetFirstParameter and
AcReqGetNextParameter to get the parameter names.
value
The string value to assign to the parameter.
Description Use AcReqSetValueString to assign a string value to a parameter. The
parameter whose value you want to set must be of type String. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
AcReqUnInitialize
Closes the Requester API library and frees resources.
Syntax Basic: Function AcReqUninitialize( sessionHandle ) As Boolean
C/C++: VBBOOL AcReqUnInitialize( long sessionHandle )
Parameter sessionHandle
The handle to the session to uninitialize. AcReqInitialize returns this value
when the Requester API is initialized.
Description When you are finished using the Requester API, call AcReqUninitialize to
close the library and free resources it used. Call AcReqUninitialize at the end
of your program.
Returns AcReqUnInitialize always returns True.
AcReqViewReport
Displays the specified report (.roi).
Syntax Basic: Function AcReqViewReport( filename As String, options As Long ) As
Long
C/C++: long AcReqViewReport( LPCSTR filename, long options )
Parameter filename
The name of the report (.roi) to display. Specify the full path name if the file is
not in the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, use the plus (+) character
between the options. The following table lists and describes the constants.
Constant Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to display the
report.
AC_REQ_LOCAL Displays the report in the current
instance of e.Report Designer,
e.Report Designer Professional, or
End User Desktop.
AC_REQ_VIEW Displays the generated report.
AC_REQ_ASYNC Runs this process asynchronously.
The function returns immediately
and the report displays in the
background. If not specified, the
function returns after the report
displays.
message to run a new instance of the End User Desktop and to run the request
asynchronously.
Description Use AcReqViewReport to display an existing report. To display a report
immediately after you generate it with AcReqGenerateReport, use the
AC_REQ_VIEW option in AcReqGenerateReport.
Returns 0 if the report was displayed.
Any number other than zero if the report was not displayed.
AcReqWriteFile
Creates a parameter value (.rov) file.
Syntax Basic: Sub AcReqWriteFile( fileNumber As Long, filename As String )
C/C++: void AcReqWriteFile( long fileNumber, LPCSTR filename )
Parameter fileNumber
The file number of the .rov or .rox file you opened with AcReqReadFile.
filename
The name of the.rov file to create. The file name must include the.rov filename
extension.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
Description Use AcReqWriteFile to write the parameter values to an .rov file. You set
parameter values using functions such as AcReqSetValueString or
AcReqSetValueInteger. Before calling AcReqWriteFile or any of the functions
to change or inspect parameter values, you must call AcReqReadFile to open
the appropriate .rox or .rov file.
After creating the .rov file, you can call AcReqGenerateReport to create a
report from that .rov file.
AcWReqConnect
Connects to the specified server.
user
The user name to use to log into iServer.
password
The password to use to log into iServer.
Description To access files and generate reports on a server, you must call AcWReqConnect
to connect to iServer. Once your program establishes a connection to iServer,
you can call any of the Requester API functions to access files on iServer.
When your program has finished executing tasks on iServer, call
AcReqDisconnect to disconnect from iServer.
Returns A number indicating the connection handle.
-1 if the connection failed.
AcWReqGenerateReport
Generates a report (.roi) from a report executable (.rox) file or a parameter
values (.rov) file.
Syntax Basic: Function AcWReqGenerateReport( filename As String, options As
Long, fileNumber As Long ) As Long
C/C++: long AcWReqGenerateReport( LPCTSTR aFileName, long options,
long fileHandle )
Parameter aFileName
The name of the .rox or .rov file to use to generate the report. Specify the full
path name if the file is not in the current directory.
If the file resides on a server, use the following format:
rotp:[//<server>]/<path>/<filename>[;<version>]
For information about specifying server file names, see Chapter 2, “Specifying
an iServer file name—Requester API.”
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, logically add them using
the plus (+) character. The following table lists and describes the constants.
Option Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to generate the
report. AC_REQ_LAUNCH_ALWAYS
and AC_REQ_LOCAL are mutually
exclusive.
AC_REQ_LOCAL Generates the report in the current
instance of e.Report Designer, e.Report
Designer Professional, or End User
Desktop. AC_REQ_LAUNCH_ALWAYS
and AC_REQ_LOCAL are mutually
exclusive.
AC_REQ_GENERATE Generates the report.
AC_REQ_VIEW Displays the generated report.
AC_REQ_PRINT Prints the generated report.
AC_REQ_ASYNC Runs this process asynchronously. The
function returns immediately and the
report generates in the background.
AC_REQ_HIDE Does not display the End User Desktop
application while it generates the report.
AC_REQ_RETURN_HANDLE Returns a handle to the synchronous
report request.
AC_REQ_STAY_OPEN Keeps the End User Desktop application
open after it generates the report. This
option is ignored if the report is generated
in the current instance of the End User
Desktop.
AC_REQ_SHOW_PROG_WND Displays the progress window of the End
User Desktop, e.Report Designer, or
e.Report Designer Professional while a
report generates.
AC_REQ_REPLACE Overwrites the latest report. When
omitted, the report is created with a
version number.
AC_REQ_USE_HANDLE Reserved.
Scope of options
The following table shows which options apply to reports generated locally or
on iServer and launched from either local or server applications.
If you do not specify any generation options, Actuate does the following by
default:
■ Generates the report with the current instance of the End User Desktop
application. If an End User Desktop application is not running, Actuate
attempts to launch a new instance, but only if you specified the location
with the AcWReqSetEUDTPath function.
■ Runs the process synchronously. The function returns after the report is
generated.
■ Displays the End User Desktop application as it generates the report only if
the report is local.
fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
Description Use AcWReqGenerateReport to generate a report based on parameter values
specified in an .rov or .rox file. Using this function, you incorporate report
generation in your application. This capability is useful for batch creation of
reports.
To generate a report from an .rov file, Actuate runs the .rox file associated with
the .rov file you specify. It looks for the .rox file in the same directory where the
.rov file resides. If the .rox file is not in the same directory as the .rov file,
Actuate displays “Can’t access <file name>.rox” and displays an open file
dialog box which you can use to find the .rox file.
To run a report in batch mode, specify the .rox file programmatically. To do
this, set the .rox file name parameter represented by the constant
AC_REQ_ROX to the name of the .rox file to use before you write the
parameter values to a new .rov file. The .rox file name is a hidden parameter
that can only be set programmatically. To set the .rox file name parameter, use
AcWReqSetValueString as the following example shows:
AcWReqSetValueString( fileNum, AC_REQ_ROX, "C:\Test\Myreport.rox" )
If the .rox you want to run is in the same directory as the .rov file, you do not
have to set the .rox file name parameter.
By default, the .roi file that AcWReqGenerateReport creates has the same root
name as the .rox file used to create the report, but you can change the .roi file
name with AcWReqSetValueString. For more information, see
“AcWReqSetValueString,” later in this chapter.
For more information and an example on generating a report, see Chapter 2,
“Using the Requester API in Visual Basic.”
Returns Use AcReqGetError function to check for errors for reports generated
asynchronously. For reports generated synchronously, the return value from
AcWReqGenerateReport indicates the result of the report execution and any
error codes as the following table shows.
Report
Return value generation mode Indication
0 Report generated Report executed successfully on a
asynchronously local client.
1 to 1023 Report generated Report execution failed.
asynchronously The return value indicates the error
code. This method returns the same
error codes as AcReqGetError. For
more information, see
“AcReqGetError.”
1024 or greater Report generated Report executed successfully on
asynchronously iServer. The return value is a request
handle that can be used to get more
information about the report, such
as the report version number.
0 or less than 0 Report generated Report executed successfully on
synchronously iServer.
greater than 0 Report generated Report execution failed.
synchronously
AcWReqGetAdhoc
Returns True if the parameter is an ad hoc parameter, False if the parameter is
not an ad hoc parameter.
Syntax Basic: Function AcWReqGetAdhoc( fileNumber As Long, parmName As String
) As Boolean
C/C++ VBBOOL AcWReqGetAdhoc( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose ad hoc attribute to return. If you do not
know the names of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
Description Use AcWReqGetAdhoc to find out if a parameter was designed as an ad hoc
parameter. An ad hoc parameter accepts a conditional expression that extends
the Where clause of a query when the report is generated.
Returns True if the parameter is ad hoc, False otherwise.
AcWReqGetAlias
Returns the alternate name of the specified parameter.
Syntax Basic: Function AcWReqGetAlias( fileNumber As Long, parmName As String
) As String
C/C++: BSTR AcWReqGetAlias( long fileHandle, LPCTSTR aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose alias you want. If you do not know the
name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetAlias to get the alias of a parameter. When defining
parameters, use alias names to create descriptive prompts that appear in the
Requester dialog box. For example, Customer Name is more descriptive than
Cust_Name.
If building a custom requestor interface in a Visual Basic form, for example,
you can use the alias names that AcWReqGetAlias returns to create an
interface similar to the Requester dialog box in e.Report Designer or e.Report
Designer Professional.
Returns The alias of the specified parameter.
An empty string if there is no alias or if an error occurred.
AcWReqGetDefaultValueCurrency
Returns the default value of the specified parameter as a currency.
Syntax Basic: Function AcWReqGetDefaultValueCurrency( fileNumber As Long,
parmName As String ) As Currency
C/C++: REQCYTYPE AcWReqGetDefaultValueCurrency( long fileHandle,
LPCTSTR aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the names of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetDefaultValueCurrency to get the default value of a parameter
as a currency. The default value is defined at design time. The default value is
constant and independent of the value the user sets. Required parameters
always have default values. The default value is used if the user does not
supply a value when the report runs.
AcWReqGetDefaultValueDate
Returns the default value of the specified parameter as a date.
Syntax Basic: Function AcWReqGetDefaultValueDate( fileNumber As Long,
parmName As String ) As Date
C/C++: double AcWReqGetDefaultValueDate( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetDefaultValueDate to get the default value of a parameter as a
date. The default value is defined at design time. This value is used if the user
does not supply a value when the report runs. A default value is constant and
independent of the value the user sets. Required parameters always have
default values.
AcWReqGetDefaultValueDouble
Returns the default value of the specified parameter as a double.
Syntax Basic: Function AcWReqGetDefaultValueDouble( fileNumber As Long,
parmName As String ) As Double
C/C++: double AcWReqGetDefaultValueDouble( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
AcWReqGetDefaultValueInteger
Returns the default value of the specified parameter as an integer.
Syntax Basic: Function AcWReqGetDefaultValueInteger( fileNumber As Long,
parmName As String ) As Integer
C/C++: long AcWReqGetDefaultValueInteger( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetDefaultValueInteger to get the default value of a parameter as
an integer. The default value is defined at design time. This value is used if the
user does not supply a value when the report runs. A default value is constant
and independent of the value the user sets. Required parameters always have
default values.
AcWReqGetDefaultValueStr
Returns the default value of the specified parameter as a string.
Syntax Basic: Function AcWReqGetDefaultValueStr( fileNumber As Long, parmName
As String ) As String
C/C++: BSTR AcWReqGetDefaultValueStr( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetDefaultValueStr to get the default value of a parameter as a
string. The parameter you specify as an argument can be of any type. To get
the default value as the type with which the parameter was declared, use type-
specific functions such as AcWReqGetDefaultValueInteger or
AcWReqGetDefaultValueCurrency.
The default value is defined at design time. This value is used if the user does
not supply a value when the report runs. A default value is constant and
independent of the value the user sets. Required parameters always have
default values.
Returns The default value of the specified parameter as a string.
AcWReqGetDefaultValueString
Returns the default value of the specified parameter as a string.
Syntax Basic: Function AcWReqGetDefaultValueString( fileNumber As Long,
parmName As String ) As String
C/C++: BSTR AcWReqGetDefaultValueString( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
Description Use AcWReqGetDefaultValueString to get the default value of a parameter as
a string. The default value is defined at design time. This value is used if the
user does not supply a value when the report runs. A default value is constant
and independent of the value the user sets. Required parameters always have
default values.
When calling AcWReqGetDefaultValueString, the parameter you specify as an
argument must be of type String. If you specify a parameter of any other type,
AcWReqGetDefaultValueString returns the default value for that type.To pass
an argument of any type, use AcWReqGetDefaultValueStr.
AcReqGetDefaultValueStr always returns a string.
Use AcWReqGetParmType to check the data type of a parameter.
Returns The default value of the specified parameter as a string.
AcWReqGetErrorString
Returns a string describing the last error that occurred during an API function
call.
Syntax Basic: Function AcWReqGetErrorString( fileNumber As Long ) As String
C/C++: BSTR AcWReqGetErrorString( long fileHandle )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
Description Use AcWReqGetErrorString to check for error conditions and retrieve a
description of the error. To get the error number, use AcWReqGetError. For a
list of the error strings that AcSReqGetErrorString return, see
AcWReqGetErrorStr.
Returns The error string of the last error.
AcWReqGetFirstGroup
Returns the name of the first parameter group in the specified parameter value
(.rov) file or parameter definition section of the specified .rox file.
Syntax Basic: Function AcWReqGetFirstGroup( fileNumber As Long ) As String
C/C++: BSTR AcWReqGetFirstGroup( long fileHandle )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
Description Use AcWReqGetFirstGroup in conjunction with AcWReqGetNextGroup,
AcWReqGetFirstParameter, and AcWReqGetNextParameter to get
information about the organization of parameters in a specified .rov or .rox
file. For example, if you are building a custom requestor interface in a Visual
Basic form, you can use the strings that these functions return to create a
structure similar to the Requester interface in e.Report Designer or e.Report
Designer Professional.
You can organize parameters into groups for ease of use. For example,
CustomerName, CustomerPhone, and Credit_Rank might be parameters in a
Customer parameters group, and City and State might be parameters in an
Office parameters group.
If there are no parameter groups, the parameters have an empty string (" ") as
their group name.
Returns The name of the first parameter group in the specified .rov or .rox file, if a
group exists.
An empty string if there are no groups or if an error occurred.
AcWReqGetFirstParameter
Returns the name of the first parameter in the specified parameter group.
Syntax Basic: Function AcWReqGetFirstParameter( fileNumber As Long, parmGroup
As String ) As String
C/C++: BSTR AcWReqGetFirstParameter( long fileHandle, LPCTSTR
aGroupName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aGroupName
The name of the parameter group in which to find the first parameter. To get
all parameters that belong in any group, specify an empty string for this
argument. If you do not know the name of the parameter group, use
AcWReqGetFirstGroup and AcWReqGetNextGroup to get the group names.
Description Use AcWReqGetFirstParameter in conjunction with
AcWReqGetNextParameter, AcWReqGetFirstGroup, and
AcWReqGetNextGroup to get information about the organization of
parameters in a specified .rov or .rox file. For example, if you are building a
custom requestor interface in a Visual Basic form, you can use the strings that
these functions return to create a structure similar to the Requester interface in
e.Report Designer or e.Report Designer Professional.
Returns The name of the first parameter in the specified parameter group.
An empty string if there are no parameters or if an error occurred.
AcWReqGetHidden
Returns True if parameter is defined as hidden, False if the parameter is not
defined as hidden.
Syntax Basic: Function AcWReqGetHidden( fileNumber As Long, parmName As
String ) As Boolean
C/C++: VBBOOL AcWReqGetHidden( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose hidden attribute you want. If you do not
know the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetHidden to find out if a parameter is defined as hidden. If a
parameter is hidden, its value can be set only through code. For example,
define a path name parameter as hidden to prevent users from changing this
value.
Returns True if the parameter is defined as hidden, False otherwise.
AcWReqGetHideText
Returns True if the parameter is defined to display asterisks as users type the
value, False if the parameter is defined to display the text that users type.
Syntax Basic: Function AcWReqGetHideText( fileNumber As Long, parmName As
String ) As Boolean
C/C++: VBBOOL AcWReqGetHideText( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose hide text attribute you want. If you do not
know the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
Description Use AcWReqGetHideText to find out if a parameter is defined to display
asterisks or actual text as users type the value. If the hide text attribute is True,
Actuate displays asterisks as users type the parameter value.
Returns True if the parameter is defined to display asterisks as users type the value,
False if the parameter is defined to display the text that users type.
AcWReqGetNextGroup
Returns the name of the next parameter group in the specified .rov file or
parameter definition section of the specified .rox file.
Syntax Basic: Function AcWReqGetNextGroup( fileNumber As Long ) As String
C/C++: BSTR AcWReqGetNextGroup( long fileHandle )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
Description Use AcWReqGetNextGroup in conjunction with AcWReqGetFirstGroup,
AcWReqGetFirstParameter, and AcWReqGetNextParameter to get
information about the organization of parameters in a specified .rov or .rox
file. You must call AcWReqGetFirstGroup before calling
AcWReqGetNextGroup. For example, if you are building a custom requester
interface in a Visual Basic form, you can use the strings that these functions
return to create a structure similar to the Requester interface in e.Report
Designer or e.Report Designer Professional.
To get the names of all parameter groups, call AcWReqGetNextGroup until it
returns an empty string. An empty string indicates that the function has
returned the last parameter group.
You can organize parameters into groups for ease of use. For example,
CustomerName, CustomerPhone, and Credit_Rank might be parameters in a
Customer parameters group, and City and State might be parameters in an
Office parameters group.
Returns The name of the next group in the specified .rov or .rox file, if there is another
parameter group.
AcWReqGetNextParameter
Returns the name of the next parameter in the specified parameter group.
Syntax Basic: Function AcWReqGetNextParameter( fileNumber As Long, parmGroup
As String ) As String
C/C++: BSTR AcWReqGetNextParameter( long fileHandle, LPCTSTR
aGroupName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aGroupName
The name of the parameter group in which to find the next parameter. If you
do not know the name of parameter group, use AcWReqGetFirstGroup and
AcWReqGetNextGroup to get the group name. To get all parameters that
belong in any group, specify an empty string for this argument.
Description Use AcWReqGetNextParameter in conjunction with
AcWReqGetFirstParameter, AcWReqGetFirstGroup, and
AcWReqGetNextGroup to get information about the organization of
parameters in a specified .rov or .rox file. You must call
AcWReqGetFirstParameter before calling AcWReqGetNextParameter.
For example, if you are building a custom requestor interface in a Visual Basic
form, use the strings that these functions return to create a structure similar to
the Requester interface in e.Report Designer or e.Report Designer Professional.
To get the names of all parameters in a group, call AcWReqGetNextParameter
until it returns an empty string. An empty string indicates that the function
has returned the last parameter.
Returns The name of the next parameter in the specified parameter group.
An empty string if there are no more parameters or if an error occurred.
AcWReqGetParmType
Returns the data type of the specified parameter as a string.
Syntax Basic: Function AcWReqGetParmType( fileNumber As Long, parmName As
String ) As String
C/C++: BSTR AcWReqGetParmType( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose data type you want. If you do not know the
name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetParmType to find out the parameter’s data type. You can use
this information to determine how to set a parameter value. You can also use
this information to determine which function to use to get a parameter’s
default or current value.
You set parameter values with functions such as AWcReqSetValueDate and
AcWReqSetValueString. You get the default values for parameters with
functions such as AcWReqGetDefaultValueDate and
AcWeqGetDefaultValueString. You get a parameter’s current value with
functions such as AcWReqGetValueDate and AcReqGetValueString.
Returns The data type of the specified parameter as a string.
AcWReqGetRequired
Returns True if the parameter is defined as required, returns False if the
parameter is defined as optional.
Syntax Basic: Function AcWReqGetRequired( fileNumber As Long, parmName As
String ) As Boolean
C/C++: VBBOOL AcWReqGetRequired( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose required attribute you want. If you do not
know the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetRequired to find out if a parameter was defined as required or
optional. If a parameter is required, Actuate generates the report only if a
value for the parameter is provided.
Use the boolean value that AcWReqGetRequired returns to determine if you
need to set a parameter value before generating a report with
AcWReqGenerateReport. You set parameter values with functions such as
AcWReqSetValueString and AcWReqSetValueDate.
Returns True if the parameter is required to generate the report, False if the parameter
is optional.
AcWReqGetValueCurrency
Returns the current value of the specified parameter as a currency.
Syntax Basic: Function AcWReqGetValueCurrency( fileNumber As Long, parmName
As String ) As Currency
C/C++: REQCYTYPE AcWReqGetValueCurrency( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetValueCurrency to get the current value of a parameter as a
currency. The current value is the last value entered in the .rov file. If accessing
an .rox file, the current value is the default value defined at design time.
When calling AcWReqGetValueCurrency, the parameter you specify as an
argument must be of type Currency. If you specify a parameter of any other
AcWReqGetValueDate
Returns the current value of the specified parameter as a date.
Syntax Basic: Function AcWReqGetValueDate( fileNumber As Long, parmName As
String ) As Date
C/C++: double AcWReqGetValueDate( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
Description Use AcWReqGetValueDate to get the current value of a parameter as a date.
The current value is the last value entered in the .rov file. If accessing an .rox
file, the current value is the default value defined at design time.
When calling AcWReqGetValueDate, the parameter you specify as an
argument must be of type Date. If you specify a parameter of any other type,
AcWReqGetValueDate returns the default value for that type. To pass an
argument of any type, use AcWReqGetValueStr. AcWReqGetValueStr always
returns a string.
Use AcWReqGetParmType to check the data type of a parameter.
AcWReqGetValueDouble
Returns the current value of the specified parameter as a double.
Syntax Basic: Function AcWReqGetValueDouble( fileNumber As Long, parmName As
String ) As Double
C/C++: double AcWReqGetValueDouble( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetValueDouble to get the current value of a parameter as a
double. The current value is the value last entered in the .rov file. If you are
accessing an .rox file, the current value is the default value defined at design
time.
AcWReqGetValueInteger
Returns the current value of the specified parameter as an integer.
Syntax Basic: Function AcWReqGetValueInteger( fileNumber As Long, parmName As
String ) As Integer
C/C++: long AcWReqGetValueInteger( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetValueInteger to get the current value of a parameter as an
integer. The current value is the value last entered in the .rov file. If you are
accessing an .rox file, the current value is the default value defined by the
programmer at design time.
When calling AcWReqGetValueInteger, the parameter you specify as an
argument must be of type Integer. If you specify a parameter of any other type,
AcWReqGetValueInteger returns the default value for that type. To pass an
argument of any type, use AcWReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcWReqGetParmType to check the data type of a parameter.
Returns The current value of the specified parameter as an integer.
AcWReqGetValueStr
Returns the current value of the specified parameter as a string.
Syntax Basic: Function AcWReqGetValueStr( fileNumber As Long, parmName
As String ) As String
C/C++: BSTR AcWReqGetValueStr( long fileHandle, LPCTSTR aParmName
)
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
Description Use AcWReqGetValueStr to get the current value of a parameter as a string.
The parameter you specify as an argument can be of any type. The current
value is the value last entered in the .rov file. If you are accessing an .rox file,
the current value is the default value defined by the programmer at design
time.
To get the current value as the type with which the parameter was declared,
use type-specific functions such as AcWReqGetValueInteger or
AcWReqGetValueCurrency.
Returns The current value of the specified parameter as a string.
AcWReqGetValueString
Returns the current value of the specified parameter as a string.
Syntax Basic: Function AcWReqGetValueString( fileNumber As Long, parmName As
String ) As String
C/C++: BSTR AcWReqGetValueString( long fileHandle, LPCTSTR
aParmName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose current value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqGetValueString to get the current value of a parameter as a string.
The current value is the value last entered in the .rov file. If you are accessing
an .rox file, the current value is the default value defined by the programmer
at design time.
When calling AcWReqGetValueString, the parameter you specify as an
argument must be of type String. If you specify a parameter of any other type,
AcWReqGetValueString returns the default value for that type. To pass an
argument of any type, use AcWReqGetValueStr. AcReqGetValueStr always
returns a string.
Use AcwReqGetParmType to check the data type of a parameter.
Returns The default value of the specified parameter as a string.
AcWReqGetVersionNumber
Returns Actuate requester API version information as a string.
Syntax Basic: Function AcWReqGetVersionNumber( ) As String
C/C++: BSTR AcWReqGetVersionNumber( )
Number Description
r Release number
v Version number
m Maintenance version
p Patch number
nnnn Build number
AcWReqHasDefaultValue
Returns True if a default value was assigned to a specified parameter.
Syntax Basic: Function AcWReqHasDefaultValue( fileNumber As Long, parmName
As String ) As Boolean
C/C++: VBBOOL AcWReqHasDefaultValue( long fileNumber, LPCTSTR
aParmName )
Parameter fileNumber
The file number of the file you opened with AcReqReadFile or
AcWReqReadFile.
aParmName
The name of the parameter whose default value you want. If you do not know
the name of the parameter, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter name.
Description Use AcWReqHasDefaultValue to determine if a default value was assigned to
a parameter. The parameter you specify as an argument can be of any type.
When you call a function such as AcWReqGetValueInteger to return the
default value of a parameter, AcWReqGetValueInteger returns zero if no
default value is set or if the default is set to zero. For this reason, always call
AcWReqHasDefaultValue to determine whether a default value is set, then
call AcWReqGetValueInteger to the value.
AcWReqPrintReport
Prints the specified report.
Syntax Basic: Function AcWReqPrintReport( filename As String, options As Long ) As
Long
C/C++: long AcWReqPrintReport( LPCTSTR aFileName, long options )
Parameter aFileName
The name of the report to print. Specify the full path name if the file is not in
the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
For information about specifying server file names, see Chapter 2, “Specifying
an iServer file name—Requester API.”
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, use the plus (+) character
between the options. The following table lists and describes the constants.
Constant Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to print the report.
AC_REQ_PRINT Prints the generated report.
Constant Description
AC_REQ_ASYNC Runs this process asynchronously. The
function returns immediately and the
report prints in the background. If not
specified, the function returns after the
report prints.
AC_REQ_HIDE Does not display the End User Desktop
application while it prints the report.
AC_REQ_STAY_OPEN Keeps the End User Desktop application
open after it prints the report. This option
is ignored if the report is printed in the
current instance of the End User Desktop.
AcWReqReadFile
Opens a parameter value (.rov) file or a report executable (.rox) file.
Syntax Basic: Function AcWReqReadFile( filename As String ) As Long
C/C++: long AcWReqReadFile( LPCTSTR aFileName )
Parameter aFileName
The name of the .rov or .rox file to open. Specify the full path name if the file is
not in the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
For information about specifying server file names, see Chapter 2, “Specifying
an iServer file name—Requester API.”
Description Use AcWReqReadFile to open an .rov or .rox file to change or get information
about parameter values before generating a report. The .rov file contains
parameter values that users set when they run a report. The .rox file contains
the parameter definitions. If you open an .rox, the default values assigned to
the parameters at design time are read into memory.
You can call AcWReqReadFile multiple times to open multiple files. Each file
is assigned a unique file number.
Returns The file number of the open file.
-1 if the user does not have permission to open the file.
AcWReqSetEUDTPath
Specifies the location of the End User Desktop application to use for report
generation or the location of the Viewer application to use for report viewing.
Syntax Basic: Sub AcWReqSetEUDTPath( pathName As String )
C/C++: void AcWReqSetEUDTPath( LPCTSTR aPath )
Parameter aPath
The location of the End User Desktop or Viewer application to run.
The following examples specify the End User Desktop and Viewer application
to run:
AcWReqSetEUDTPath( "C:\Program Files\Actuate7\Eudt\Bin\Runview.exe" )
AcWReqSetEUDTPath( "C:\Program Files\Actuate7\Viewer\Bin\Viewer.exe" )
Description Use AcWReqSetEUDTPath to specify the location of the End User Desktop to
use for report generation. If generating reports on iServer, do not set this path.
You need to call AcReqSetEUDTPath in the following situations:
■ If you run the End User Desktop remotely, for example, from a Visual Basic
application.
■ If you do not specify the AC_REQ_LOCAL option with
AcWReqGenerateReport. The AC_REQ_LOCAL option specifies that the
report be generated in the current instance of e.Report Designer, e.Report
Designer Professional, or End User Desktop.
If opening a report for viewing, you can use AcWReqSetEUDTPath to specify
which End User Desktop or Viewer application displays the report.
AcWReqSetPrinterName
Specifies the printer to use.
Syntax Basic: Sub AcWReqSetPrinterName( printerName As String )
C/C++: void AcWReqSetPrinterName( LPCTSTR printerName )
Parameter printerName
The name of the printer to use.
Description Before sending a print job, use AcWReqSetPrinterName to specify a printer
different than the default one. If you want revert to the system’s default
printer after printing a job to the printer you specify with this function, call
AcReqSetDefaultPrinter. To print a report, use AcWReqPrintReport.
AcWReqSetValueCurrency
Sets the value of the specified parameter as a currency.
Syntax Basic: Sub AcWReqSetValueCurrency( fileNumber As Long, parmName As
String, value As Currency )
C/C++: void AcWReqSetValueCurrency( long fileHandle, LPCTSTR
aParmName, REQCYTYPE value )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
value
The currency value to assign to the parameter.
Description Use AcWReqSetValueCurrency to assign a currency value to a parameter. The
parameter whose value you want to set must be of type Currency. Use
AcWReqGetParmType to check the data type of a parameter before setting its
value.
In C/C++, the structure REQCYTYPE, stores up to 64 bits. If you need to
assign a currency value to a parameter that requires a 96-bit structure, convert
the currency value to a string value. Then call AcWReqSetValueString to
assign the value. If you call AcWReqSetValueCurrency to assign a currency
value larger than 64 bits, GetError returns an error number.
AcWReqSetValueDate
Sets the value of the specified parameter as a date.
Syntax Basic: Sub AcWReqSetValueDate( fileNumber As Long, parmName As String,
value As Date )
C/C++: void AcWReqSetValueDate( long fileHandle, LPCTSTR aParmName,
double value )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
value
The date value to assign to the parameter. The date value is a floating point
number containing the number of days from midnight on December 30, 1899.
Hours are shown as a fraction of a day. For example, the value for December
30, 1899 is 0.0. The date value for January 1, 1900 at 6 A.M. is 2.25.
Description Use AcWReqSetValueDate to assign a date value to a parameter. The
parameter whose value you want to set must be of type Date. Use
AcWReqGetParmType to check the data type of a parameter before setting its
value. Ensure that the date value passed to AcWReqSetValueDate is a floating
point number expressed using the format described for the value parameter.
On Windows servers, you can call the C++ function, COleDateTime, to convert
the date for AcWReqSetValueDate.
Example The following example shows how to work with dates expressed as C++
doubles on Windows NT:
int fileNumber;
double inDate, outDate;
COleDateTime oleDate( 1967, 12, 6, 0, 0, 0 ); // y m d h m s
inDate = oleDate;
fileNumber = AcWReqReadFile( szSourceRox );
outDate = AcWReqGetDefaultValueDate(fileNumber, "aDate");
oleDate = outDate;
AcWReqSetValueDate( fileNumber, "aDate", inDate );
AcReqCloseFile( fileNumber );
AcWReqSetValueDouble
Sets the value of the specified parameter as a double.
Syntax Basic: Sub AcWReqSetValueDouble( fileNumber As Long, parmName As
String, value As Double )
C/C++: void AcWReqSetValueDouble( long fileHandle, LPCTSTR
aParmName, double value )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
the names of the parameters, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
value
The double value to assign to the parameter.
Description Use AcWReqSetValueDouble to assign a double value to a parameter. The
parameter whose value you want to set must be of type Double. Use
AcWReqGetParmType to check the data type of a parameter before setting its
value.
For an example of how to set dates from C++ as doubles, see Chapter 2,
“Using the Requester in a C++ application.”
AcWReqSetValueInteger
Sets the value of the specified parameter as an integer.
Syntax Basic: Sub AcWReqSetValueInteger( fileNumber As Long, parmName As
String, value As Integer )
C/C++: void AcWReqSetValueInteger( long fileHandle, LPCTSTR
aParmName, long value )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aParmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
value
The integer value to assign to the parameter.
Description Use AcWReqSetValueInteger to assign an integer value to a parameter. The
parameter whose value you want to set must be of type Integer. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
AcWReqSetValueString
Sets the value of the specified parameter as a string.
Syntax Basic: Sub AcWReqSetValueString( fileNumber As Long, parmName As
String, value As String )
C/C++: void AcWReqSetValueString( long fileHandle, LPCTSTR
aParmName, LPCTSTR value )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
AParmName
The name of the parameter whose value you want to set. If you do not know
the names of the parameters, use AcWReqGetFirstParameter and
AcWReqGetNextParameter to get the parameter names.
value
The string value to assign to the parameter.
Description Use AcWReqSetValueString to assign a string value to a parameter. The
parameter whose value you want to set must be of type String. Use
AcReqGetParmType to check the data type of a parameter before setting its
value.
AcWReqViewReport
Displays the specified report (.roi).
Syntax Basic: Function AcWReqViewReport( filename As String, options As Long ) As
Long
C/C++: long AcWReqViewReport( LPCTSTR aFileName, long options )
Parameter aFileName
The name of the report (.roi) to display. Specify the full path name if the file is
not in the current directory.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
For information about specifying server file names, see Chapter 2, “Specifying
an iServer file name—Requester API.”
options
A set of constants you can use to specify how the End User Desktop
application runs. When specifying multiple options, use the plus (+) character
between the options. The following table lists and describes the constants.
Constant Description
AC_REQ_LAUNCH_ALWAYS Runs a new instance of an End User
Desktop application to display the
report.
AC_REQ_LOCAL Displays the report in the current
instance of e.Report Designer,
e.Report Designer Professional, or
End User Desktop.
AC_REQ_VIEW Displays the generated report.
AC_REQ_ASYNC Runs this process asynchronously.
The function returns immediately
and the report displays in the
background. If not specified, the
function returns after the report
displays.
AcWReqWriteFile
Creates a parameter value (.rov) file.
Syntax Basic: Sub AcWReqWriteFile( fileNumber As Long, filename As String )
C/C++: void AcWReqWriteFile( long fileHandle, LPCTSTR aFileName )
Parameter fileHandle
The handle to the file you opened with AcReqReadFile or AcWReqReadFile.
aFileName
The name of the.rov file to create. The file name must include the.rov filename
extension.
If the file resides on a server, use the following format:
<service>:[//<server>]/<path>/<filename>[;<version>]
For information about specifying server file names, see Chapter 2, “Specifying
an iServer file name—Requester API.”
Description Use AcWReqWriteFile to write the parameter values to an .rov file. you set the
parameter values using functions such as AcWReqSetValueString or
AcWReqSetValueInteger. Before calling AcWReqWriteFile or any of the
functions to change or inspect parameter values, you must call
AcWReqReadFile to open the appropriate .rox or .rov file.
After creating the .rov file, you can call AcWReqGenerateReport to create a
report from that .rov file.
Undocumented functions
The following functions are undocumented and are intended for internal use
only. Actuate reserves the right to change these functions without notice and
does not recommend their use for any purpose.
AcReqAddToCache
AcReqDropFromCache
AcReqGetCacheFile
AcReqGetPrinterCapabilities
AcReqInfo
user guide
This chapter contains the following topics:
■ About the search extension API
■ Search extension API functions by programming task
■ Developing a search extension
■ Installing a custom search extension
GetName and Open are startup operations called at the beginning of the
search process. Close is called when the search is complete.
InputParameters is called when the user clicks Options on the Search Extract
Option dialog. Actuate calls GetParameters when it saves a search definition
and SetParameters when it reads a search definition.
Actuate stores search parameters, including the extension-specific parameters,
in an ROS file. The default directories for search definitions and search
extensions are SrchDef and SrchExt, respectively. These directories are at the
same level as the product directory, usually C:\Program Files\Actuate7. You
can change the default directories by adding two entries to the Windows
registry:
HKEY_CURRENT_USER/Software/Actuate/SearchDefDir
HKEY_CURRENT_USER/Software/Actuate/SearchExtDir
Each registry entry is a new string value that contains the fully qualified path
to the search definition or extension folder. These registry entries are optional
reference
This reference alphabetically lists the functions in the search extension API.
For a conceptual discussion of the search extension API, see
Chapter 23, “Search extension API user guide.”
The function descriptions typically explain the code that you must write to
implement the function rather than prebuilt functionality. You must
implement all functions marked as required.
Close
Closes files or APIs and performs other cleanup operations. This function is
required.
Syntax BOOL Close(long event)
Parameter event
The reason for closing the search extension:
0 - the search completed normally
1 - the search was stopped by the user
2 - the search was stopped due to the application closing
3 - the search was not started
Description Actuate calls Close when the search extension is closing and passes a
parameter indicating the event that terminated the search. For normal
completion, the extension must implement code to close files, APIs, and other
cleanup operations.
For all other cases, the results of the search are missing or incomplete. The
extension must implement cleanup code, but should not launch a third-party
application or create a partial report.
Returns True if the operation is successful, False otherwise.
GetColumnDelimiter
Specifies the delimiter character that separates columns of search data. This
function is required.
Syntax const char* GetColumnDelimiter( )
Description This function returns the delimiter Actuate uses when formatting a row.
Actuate passes the formatted row to the extension in PutRow. The extension
can modify the row delimiter before passing it on to the external application,
when necessary.
Returns A null-terminated character string that defines the row delimiter.
GetName
Specifies a user-friendly name for the search extension. This function is
required.
Syntax const char* GetName( )
Description This function returns the name that Actuate uses to identify the extension.
Actuate displays this name in the External Applications combo box on the
Search options dialog.
Returns A character string that represents the name of the extension.
GetParameters
Specifies the extension-specific parameters for the search operation.
Syntax const char* GetParameters( )
Description This function returns a string that specifies the extension-specific parameters
for the search operation. This information is typically the options collected
during the InputParameters call. This function works in conjunction with
SetParameters to allow the extension to store and retrieve information from
the search definition file. Actuate returns this string to the extension
application through the SetParameter argument. Actuate calls GetParameters
before it saves the search definition file.
Returns A null-terminated character string containing search parameters. The search
extension applications defines the content and format.
The default value if GetParameters is not implemented is an empty string.
IncludeHeader
Specifies whether or not the search data should include a header.
Syntax BOOL IncludeHeader( )
Description This function returns a Boolean indicating if the first row sent to the extension
should be a header containing the names of the columns separated with the
column delimiter.
InputParameters
Collects extension-specific parameters from the user.
Syntax BOOL InputParameters( )
Description Actuate calls this function when the user clicks Options in the Search Extract
Option dialog. Typically, the search extension application opens a dialog that
prompts the user for additional extension-specific parameters.
Returns True if any parameters have been modified, False otherwise.
The default value is False if the function is not implemented.
Open
Opens files or APIs used in the search process. This function is required.
Syntax BOOL Open( )
Description Actuate calls this function when the search process begins. The extension
should implement code to open files or APIs based on parameters or other
relevant information.
Returns True if the function is successful, False otherwise.
PutRow
Transfers each row as it is created during the search process. This function is
required.
Syntax BOOL PutRow( long rowIdx, const char* row )
Parameter rowIdx
A number indicating the row index for the search.
char
A null terminated string containing all the data columns separated with the
column delimiter.
Description Actuate calls this function for each row generated during the search process.
The first row is a header row if the IncludeHeader function returns True.
Returns True to indicate acceptance of the row, False otherwise.
SetDataTypeInfo
Provides the data types for all columns of a row.
Syntax void SetDataTypeInfo( long numCols, long *dataTypes )
Parameter numCols
The number of columns in a row.
*dataTypes
An array of corresponding data types for each column. Valid data types are:
■ ANY_TP
■ ANYCLASS_TP
■ ARRAY_TP
■ BYTE_TP
■ CPOINTER_TP
■ CURRENCY_TP
■ DOUBLE_TP
■ DT_TIME_TP
■ EMPTY_TP
■ INSTANCE_TP
■ INT_TP
■ LONG_TP
■ NO_TP
■ NULL_TP
■ OLE_TP
■ REF_TP
■ SINGLE_TP
■ STRING_TP
■ UNKNOWN_TP
■ USER_TP
■ VARIANT_TP
Description This function provides the data types for all the columns in a row. Implement
is only if the data type information is needed in the search extension. Actuate
calls SetDataTypeInfo after the Open function call. The pointer to the
dataTypes array is temporary. This means you should copy its contents in the
specific implementation.
SetParameters
Passes extension-specific search definition parameters to the search extension
DLL.
Syntax void SetParameters( const char* parms )
Parameter params
A character string containing the extension-specific search parameters. This
string matches the one returned by GetParameters.
Description Use this function to restore the extension-specific parameters retrieved from a
search definition file. This function works in conjunction with the
GetParameters function to allow the extension to store and retrieve
information from the search definition file. Actuate calls SetParameters after it
reads the search definition file.
user guide
This chapter contains the following topics:
■ About Actuate’s ActiveX controls
■ About report files and the Actuate ActiveX controls
■ Actuate ActiveX methods by programming task
■ Visual Basic example
■ Installing Actuate ActiveX controls
return CDialog::PreTranslateMessage(pMsg);
}
<drive>
The hard drive specification such as C.
<path>
The full path to the file using Windows path separators.
<filename>
The complete file name, including the .rox, .rov, or .roi file extension.
<server>
Optional specification of iServer name. The default value is the current
connection.
<filename>
The complete file name including the .rox, .rov, or .roi file extension.
<version>
Optional specification of the file version as the following table shows.
Value Description
Latest The most recent version of the file. This is the default
value.
Oldest The oldest version of the file
LatestDev The most recent development version of the file
LatestRel The most recent released version of the file
<#> The specific version number of the file
<version name> The specific version name of the file
Method Description
ConnectToServer Establishes a server connection, which other
methods use to access, view, and print reports
stored in the Encyclopedia volume.
OpenReportInstance Opens a report, either in the Encyclopedia volume
or the native file system, and displays the first
page in the view window.
CloseReportInstance Closes the report.
GetLastError Gets the last error that occurred. Use this method
to get the text of the error when a method returns a
failure.
Method Description
AboutBox Opens the Actuate ActiveX About dialog
Back After a user follows a hyperlink, opens the
previously viewed report
CurrentPage Returns the current page number of the
open report
FirstPage Resets the report view to the first page
GetMostRecentListCount Returns the number of the most recently
opened reports
Event Description
BackDisable Occurs when the user has not followed an external
hyperlink or when the list of previously viewed
reports does not contain any reports.
BackEnable Occurs when a user has followed an external
hyperlink
Running a report
The Desktop ActiveX control runs reports only on the native file system. The
first page of the new report instance automatically appears in the Actuate
ActiveX control window when the report is available.
Method Description
OpenReportExecutable Opens a report executable (.rox) file. Use in
(Desktop ActiveX Control conjunction with RunReport to generate a new
only) report.
RunReport (Desktop Opens the standard parameter screen, runs
ActiveX Control only) the open report executable file, and displays
the generated report.
RunReportWithParameters Runs the open report executable file using a
(Desktop ActiveX Control parameter file and displays the generated
only) report.
CanRunReport (Desktop Indicates whether or not a report executable
ActiveX Control only) file is open and can run.
CancelReport (Desktop Cancels a currently executing request to run a
ActiveX Control only) report.
CloseReportExecutable Closes the current report instance, if there is
(Desktop ActiveX Control one, and the report executable file.
only)
Method Description
BundleReportInstance Bundles a report executable file with a report
object instance file.
MailReportInstance Displays the mail dialog with the current report
instance attached.
PrintReport Opens the Windows print dialog where users can
specify print options or prints with system
defaults. Supersedes the Print method.
SaveAsXMLData Saves the open report in XML format.
if ( count )
{
' Get the status strings
' The following assumes that
' only two status strings exist
statusString1 = GetStatusCount( 0 );
statusString2 = GetStatusCount( 1 );
}
The center window is the primary Desktop control element. This window
displays the open report instance. In this example, the Desktop control opens a
report called forecast when the user clicks View or Run. Each button in the
window invokes additional viewer functionality by making calls to the
Desktop control interface.
Button tool
Exit_Click
The Exit button closes the report with CloseReportInstance(). Closing the
report makes it available to other applications.
Next_Click
The Next button uses NextPage() to advance the report to the next page,
except at the last page. This navigation tool supports paging forward through
the document.
Print_Click
The Print button opens the standard Windows dialog for user input. The
argument of False means that the open document prints using the default
printer settings.
Run_Click
The Run button invokes two Desktop control methods. First, it opens the
report executable file with OpenReportExecutable(), then it runs the report
with RunReport().
Contents_Click
The Contents button uses TableOfContents() to open Actuate’s table of
contents window. Using the Contents window, users see a visual
representation of the report contents and can jump directly to a specific
section.
View_Click
The View button uses the OpenReportInstance() method to open a report and
display it in the Desktop control window. In this case, the application opens a
report in the native file system, so it does not need to establish a server
connection first. The display zooms to 50% using SetScaleFactor() to fit more of
the report in the window.
ActiveX afc
bin
etc
reference
The Actuate Desktop and Viewer ActiveX controls conform to the Microsoft
standard for ActiveX (OCX) controls. This reference describes the methods
and events you can use with the controls. Some methods are available only
with the Desktop control and are marked as such.
AboutBox
Opens the Actuate ActiveX About dialog.
Syntax void AboutBox()
Description This method opens the Actuate ActiveX About dialog. The dialog displays the
Actuate ActiveX version number and copyright information.
Back
Opens the report the user viewed before following an external hyperlink.
Syntax short Back()
Description This method removes the path of the report the user viewed before following
an external hyperlink from the back stack and opens that report. You cannot
use the Back() method to open a previous location in the same report.
Returns 1 if the method succeeded, 0 otherwise.
BackDisable
Occurs when the user has not followed an external hyperlink or when there
are no reports in the list of recently opened reports.
Syntax BackDisable()
Description BackDisable occurs when the user has not followed an external hyperlink or
when the list of previously viewed reports does not contain any reports. For
example, you can use BackDisable to disable the Back button in your
application if the user has not followed any external hyperlinks.
BackEnable
Occurs when an external hyperlink has been followed.
Syntax BackEnable()
Description BackEnable occurs when a user followed an external hyperlink or if there are
reports in the list of recently opened reports. For example, use BackEnable to
enable the Back button that lets users return to the last report the user viewed.
BundleReportInstance
Bundles a report executable (.rox) file with a report document (.roi) file.
Syntax BOOL BundleReportInstance(LPCTSTR fileName)
Parameter fileName
The name of the bundled report.
Description This method bundles the report executable (.rox) file into the report document
(.roi) file. BundleReportInstance saves the bundled report with the specified
file name.
Returns True if the .rox was bundled with the .roi and saved to a file.
False if the bundled .roi was not saved to a file.
CallBasicFunction
Calls an Actuate Basic function in the open report.
Syntax long CallBasicFunction(LPCTSTR methodName, const VARIANT& arg1,
const VARIANT& arg2, const VARIANT& arg3, const VARIANT& arg4,
const VARIANT& arg5)
Parameter methodName
String containing the name of an Actuate Basic function to call. This function
must be a global function in the report and must return an integer (long).
Returns The value the Actuate Basic function returns, unless an error occurs. If an error
occurs, CallBasicFunction returns one of the following error codes.
CancelReport
Desktop ActiveX Control only. Cancels report generation.
Syntax void CancelReport()
Description This method stops report generation requested with RunReport or
RunReportWithParameters. Call this method during report generation.
CanRunReport
Desktop ActiveX Control only. Indicates whether or not a report executable file
can run.
Syntax BOOL CanRunReport()
Description A report can be generated if a report executable file is open and a report is not
currently running. You can use the return value to enable or disable user
interface elements.
Returns True if a report executable file can be run, False otherwise.
CloseReportExecutable
Desktop ActiveX Control only. Closes the report executable file.
Syntax BOOL CloseReportExecutable()
Description This method closes the open report instance, if there is one, and the report
executable file. Call this method after the report executable file finishes
running.
Returns True if the method succeeded, False otherwise.
CloseReportInstance
Closes the open report.
Syntax short CloseReportInstance()
Description This method closes the open report and leaves the Actuate controls idle. Call
this method when changing the view from one report to another.
Returns 1 if the method succeeded, 0 otherwise.
ConnectToServer
Establishes an iServer connection.
Syntax BOOL ConnectToServer(LPCTSTR hostName, LPCTSTR userName,
LPCTSTR password)
Parameter hostName
The name of the host computer where iServer is running. iServer has the same
name as the host computer.
userName
The name of a valid user on the administration server.
password
The password associated with the userName.
Description To access reports in an Encyclopedia volume, the client application must first
connect to iServer as a user with the necessary read permissions.
This method makes the necessary server connection and validates the user
name and password. If you attempt to open a report on a server before calling
this method, a dialog appears for entering the user name and password. All
other methods use this connection to exchange information with iServer.
Accessing reports stored in the native file system does not require this
connection.
Returns True if the connection succeeded, False otherwise.
CurrentPage
Returns the current page number.
Syntax long CurrentPage()
Description This method is a navigation aid for client applications. Use this method to
display page status, like page x of y.
Returns The current page number.
FirstPage
Resets the view to the first page of the report.
Syntax BOOL FirstPage()
Description This method returns the view to the beginning of a report. If the view is at the
first page, this method has no effect.
Returns True if the change succeeded, False otherwise.
GetLastError
Returns the last error message.
Syntax BSTR GetLastError()
Description This method returns a text description of the last error encountered. You
typically invoke GetLastError after a method returns a Fail result code. This
method does not return the result of the last executed method.
GetMostRecentListCount
Returns the number of items in the most recently opened reports list.
Syntax short GetMostRecentListCount()
Description This method returns the number of items in the recently opened reports list.
Up to 20 reports are kept in the recently opened list.
The index for the recently opened reports list starts with 0.
Returns The number of most recently opened reports.
GetMostRecentListItemAt
Returns the URL or path of the specified report from the recently opened
reports list.
Syntax BSTR GetMostRecentListItemAt(long index)
Parameter index
The list location of the item. The index starts with 0.
Description This method returns the URL or path string of the specified item from the
recently opened reports list.
Returns The URL or path CString of the report.
GetStatusCount
Returns the number of status messages in the stack.
Syntax long GetStatusCount()
Description This method returns the number of status messages in the stack. The stack
holds a maximum of messages 500 messages.
Returns The number of status messages.
GetStatusMessageAt
Returns the status message string from the specified point in the status stack.
Syntax BSTR GetStatusMessageAt(long index)
Parameter index
The list location of the message. The index starts with 0.
Description This method returns the status message from the specified point in the status
stack.
Returns The status message.
GoToPage
Changes the view to a specific page number of the report.
Syntax BOOL GoToPage(long Page)
Parameter Page
The number of the desired page.
Description Use this method to move through reports when you know the content
location.
Returns Returns True if the change succeeded, False otherwise.
LastPage
Advances the view to the last page of the report.
Syntax BOOL LastPage()
Description This method advances the view to the end of a report. If the view is at the last
page, this method has no effect.
Returns True if the change succeeded, False otherwise.
LoadResource
Loads the NLS resource DLL.
Syntax BOOL LoadResource(LPCTSTR localeName)
Parameter localeName
Three-letter Windows language symbol such as JPN, ENU, or FRA.
Description This method loads the NLS resource DLL specified by the localeName. After
executing LoadResource, the Actuate dialogs and error messages appear in the
language localeName specifies.
LoadResource looks for the file <appname>.xxx in the Nls\Xxx\Directory. For
example, if the application name is AxDesk and the localeName is jpn
LoadResource looks for Nls\Jpn\Axdesk.jpn.
If LoadResource cannot find Nls\Xxx\<appname>.xxx, it looks for
Nls\Xxx\<appname>.dll. If a resource DLL is not found, the English
resources in the executable file are used.
To view loaded language resources, your system must be set up for the
appropriate language. For example, you can load a Japanese resource DLL
under US English Windows but it will not display correctly.
Returns Returns True if the file was loaded, False otherwise.
MailReportInstance
Displays the mail dialog with the current report instance attached.
Syntax BOOL MailReportInstance([bundle])
bundle (optional)
True bundles the report executable (.rox) file into the report document (.roi)
file before the report is mailed. False does not bundle the .rox file. The default
value is False.
Description This method displays the mail dialog with the current report instance
attached.
Returns True if the .roi was attached to an e-mail, False otherwise.
NextPage
Advances to the next page of the report.
Syntax BOOL NextPage()
Description This method advances the view to the next page of the report. If the view is at
the last page, this method has no effect.
Returns True if the page change succeeded, False otherwise.
OpenRecentReportInstance
Opens the specified report from the recently opened reports list.
Syntax short OpenRecentReportInstance(long index)
Parameter index
The list location of the desired report. The index starts at 0.
Description This method opens the specified report from the recently opened reports list.
OpenReportExecutable
Desktop ActiveX Control only. Opens a report executable file.
Syntax BOOL OpenReportExecutable (LPCTSTR reportName)
Parameter reportName
The fully qualified name of the report file (.rox), expressed as a Windows path
and file name. The rotp format is not valid in this context.
Description This method opens a report executable file in preparation for report
generation. Client applications use report executable files to generate reports
with updated data. You can open only one report executable file at a time.
The Desktop ActiveX Control can read report executable files only from the
local file system, so construct the report name as a Windows path and file
name, such as C:\Eastern Region\Forecast.rox. To run reports on iServer or to
extract report executable files from iServer for local execution, use the Report
Server API in conjunction with the Desktop ActiveX control.
Returns True if the file open succeeded, False otherwise.
OpenReportInstance
Opens a report in the Encyclopedia volume or the client file system.
Syntax short OpenReportInstance (LPCTSTR reportName)
Parameter reportName
The fully qualified name of the report file (.roi) to open.
Description This method opens a report and displays the first page in the client application
window. It retrieves the report from the Encyclopedia volume if reportName is
formatted in the rotp format. For example, to open a report called Forecast in
the Eastern Region folder in the Paradise Encyclopedia volume, as the
reportName, type
rotp://Paradise/Eastern Region/Forecast.roi
The server enforces access permissions before opening the report. This means
the user must have read permission to open the requested report. If this you
call this method without an active server connection, it displays a dialog that
prompts for a user name and password.
If the report file specification is formatted as a Windows path, such as
C:\Eastern Region\Forecast.roi, this method retrieves the report from the PC’s
file system. Only one report can be open at a time. For more information about
specifying local or server reports, see “About report files and the Actuate
ActiveX controls,”in Chapter 25, “Actuate ActiveX controls user guide.”
Returns 1 if the file open succeeded, 0 otherwise.
PageCount
Returns the page count for the open report.
Syntax long PageCount()
Description This method is a navigation aid for client applications. You typically use this
method to display report page information, such as page x of y, where y is the
page count.
Returns The number of pages in the current view.
PreviousPage
Moves to the previous page of the report.
Syntax BOOL PreviousPage()
Description This method is a navigation aid for client applications. You typically use this
method to page backward through the report. At the first page, this procedure
has no effect.
Returns True if the page change succeeded, False otherwise.
Print
Opens the standard Windows print dialog for report printing. Use in C++
applications only.
Syntax void Print(BOOL showDialog)
Parameter showDialog
True opens the standard Windows print dialog. False prints with default print
parameters.
Description Use this method to print the open report using the standard print utilities of
the Windows operating system. Print options are either system defaults or
user-selected.
PrintReport supersedes the Print method. Visual Basic developers must use
PrintReport for report printing. C++ developers can continue to use Print.
PrintReport
Opens the standard Windows print dialog for report printing. This method
supersedes Print.
Syntax void PrintReport(BOOL showDialog)
Parameter showDialog
True opens the standard Windows print dialog. False prints with default print
parameters.
Description Use this method to print the open report using the standard print utilities of
the Windows operating system. Print options are either system defaults or
user-selected. Visual Basic developers must use PrintReport for report
printing. C++ developers can use either PrintReport or Print.
ResetStatus
Clears the status stack.
Syntax void ResetStatus()
Description This method clears the status stack.
RunReport
Desktop ActiveX Control only. Runs the open report executable file to generate
a new report instance.
Syntax BOOL RunReport()
Description This method runs the open report executable file and generates a report
instance in the local file system. Before calling this method, open the report
executable file with OpenReportExecutable.
Before running the report, RunReport opens the parameter dialog for user
input. This method returns when the report completes, encounters an error, or
is canceled. While the report executes, the application continues to get
window messages so that a Cancel button is effective. When the report is
complete, RunReport displays the first page of the report in the Actuate
control window of the client application.
Returns True if the report executed successfully, False otherwise.
RunReportWithParameters
Desktop ActiveX Control only. Runs the open report executable file to generate
a new report instance.
Syntax BOOL RunReportWithParameters(LPCTSTR parameterFile)
Parameter parameterFile
The fully qualified name of the report parameter values file (.rov) to open.
Description This method runs the open report executable file and generates a report
instance in the local file system, using parameters specified in the parameter
file. Before calling this method, open the report executable file with
OpenReportExecutable.
RunReportWithParameters generates the report using parameters stored in
the specified parameter file. This method returns when the report completes,
encounters an error, or is canceled. While the report is executing, the
application continues to get window messages, so a Cancel button is effective.
When the report is complete, RunReportWithParameters displays the first
page of the report in the Actuate control window of the client application.
Returns True if the report executed successfully, False otherwise.
SaveAsXMLData
Saves the open report in XML format.
Syntax BOOL SaveAsXmlData(LPCTSTR filename)
Parameter filename
The file name for XML output.
Description This method converts the open document to XML format and saves it to the
users’s disk. The document is not saved in the Encyclopedia volume.
Returns True if the conversion was successful, False otherwise.
SearchWindow
Opens a window for searching a report.
Syntax BOOL SearchWindow()
Description This method opens an Actuate search window. You can search objects in the
open report for specific values or ranges. For example, from the Search dialog
you could search the Company Name field for a specific company. The
Actuate control search window is identical to the Viewer search window.
Returns True if the request succeeded, False otherwise.
SetScaleFactor
Sets the scale factor for the view.
Syntax BOOL SetScaleFactor(long factor)
Parameter factor
The scale factor for the view, stated as a percent. The minimum value is 25%.
The maximum value is 400%. The default value is 100%.
Description This method is typically linked to a view control that lets you zoom in and out
on reports.
Returns True if the scale factor request succeeded, False otherwise.
SetWindowLayout
Sets the Windows layout to right to left or left to right.
Syntax BOOL SetWindowLayout(int orientation)
Parameter orientation
The Windows orientation:
■ 0 Windows layout is left to right
■ 1 Windows layout is right to left
Description Use this method for right to left languages. It sets the Windows layout for the
Search, Table of Contents, and GoToPage windows. You must call
SetWindowLayout before opening a report instance.
Returns True if the method succeeded, False otherwise.
TableOfContents
Opens a window that displays Actuate’s table of contents window.
Syntax BOOL TableOfContents()
Description This method opens Actuate’s table of contents window for the open report.
The table of contents window displays the sorting and grouping structure of
the report. When finished, you can close the table of contents window using
standard Windows procedures.
Returns True if the table of contents request succeeded, False otherwise.
Index 507
AcBTree class 14 AcDataSource class
Access Control Lists 133 overview 6, 9
customizing 153–154 subclassing for custom data streams 94
displaying 139 AcDateTimeControl class 14
suppressing security IDs in 153 AcDBConnection class 5, 8
access control lists (ACLs) AcDBCursor class 9, 85
debugging 120 AcDBStatement class 9, 85
access restrictions 132, 154 AcDetailGraph class 14
accessing AcDoubleControl class 14
data xxiii AcEllipseControl class 14
report sections 153 acfile.dll 487
Java objects xxvii AcFlow class 6, 11
online documentation xxxii AcFrame class 12
accessing Actuate APIs 337 AcGraph class 14
accessing data AcGroupSection class 10
from external applications 81, 292, 304 AcHLCGraph class 14
from multiple sources 98–103 AcImageControl class 14
in flat files 94–98 AcInformixConnection class 8
in input data sources 79 AcIntegerControl class 14
in OLE objects 294, 295 AcIterator class 14
in SQL tables 85 AcLabelControl class 14
in text files 90 AcLeftRightPageList class 11, 73
methods specific to 31 AcLineControl class 14
accessing Java objects 316, 317–318 AcList class 14
accessing online help xxxii AcMemoryBuffer class 10, 80
accessing report files 376, 426 AcMemoryDataSorter class 10
accessing reports AcMSSQLConnection class 8
ActiveX method calls for 496 AcMultipleInputFilter class 10, 80, 98
in Encyclopedia volumes 335 AcObjectArray class 14
AcCleanup function 310 AcODBCConnection class 8
AcCollection class 14 AcOleContainerControl class 14
AcComponent class 5, 7 AcOleControl class 14
AcConditionalSection class 10 AcOracleConnection class 8
AcConnection class AcOrderedCollection class 14
overview 5, 8 AcPage class 11
subclassing 85 AcPageList class 6, 11, 73
AcControl class 6, 14 AcParallelReport class 10
accorvu.dll 487 AcPopupMenu class 14
AcCurrency class 314 AcProgressConnection class 8
AcCurrencyControl class 14 AcProgressSQL92Connection class 8
AcDataAdapter class 6, 9, 78 AcRecordBuffer class 80
AcDatabaseSource class 9 AcRectangleControl class 14
AcDataControl class 14 AcReport class
AcDataFilter class 6, 9 instantiating 66
AcDataFrame class 11 overview 6, 7
AcDataRow class 6 subclassing 239
AcDataSection class 10 XML-specific properties 231
Index 509
AcReqWriteFile function 344, 425 calling functions from ActiveX
acrq3041.dll 341 controls 481, 493
acrq4060.dll 339 class data types for 265
acrq5060.dll 339 cleanup code for 66, 463
acrs4060.dll 340 code elements 252–256
acrs5060.dll 340 code examples for 258, 358
AcSection class 6, 10 compared to Visual Basic 250
AcSequentialSection class 10 control structures 285
AcSimplePageList class 11, 73 creating source files for 281
AcSingleInputFilter class 10, 80 debugging code 116, 118
AcSingleList class 14 defining stored procedures with 192
AcSingleListIterator class 14 editing restrictions 55, 56, 60, 61
AcSQLQuerySource class 10, 80 editor for 48
AcSubPage class 11 extending functionality 280, 310
AcSummaryGraph class 14 instantiating classes with 18
AcSybaseConnection class 8 Java type conversions for 318, 319
AcSybaseDBLibConnection class 8 multiple method definitions in 32
AcTextControl class 14 naming conventions 257
AcTitleBodyPageList class 11, 73 optimizing code 267, 272
active connection 352 overview 250–251
Active Portal xxv private and public variables in 26
do_executereport.jsp JavaServer Page 217 programming conventions 251, 256–258
ActiveX API reference 491 selecting API for 337
ActiveX controls xxv simplifying programming tasks 280
adding 474, 483 standard data types for 265
developing applications with 482 startup code for 66, 463
embedding in dialogs 475 stopping debugging sessions for 125
error handling 481 support for OLE automation 304
files associated with 476 tracking methods calls for 128
implementing with Requester API 489 variable type mappings 198–199
installing 486 Actuate Desktop controls 483
overview 292, 327 Actuate Foundation Class Library xxv
programming tasks for 477 Actuate Foundation Class library
selection guidelines for 330 overview 4
ActiveX methods scoping conventions in 24
alphabetical reference 491 Actuate Foundation Classes
categorized 477 See also classes; specific class
ActiveX viewing window base classes described 5
changing views in 495 categorized 7
displaying reports in 476, 479, 503, 504 class-specific types 265–266
moving to specific page in 498, 499, 502 deriving classes from 20
resetting to first page 496 getting information about 48
scaling reports for 505 instantiating 4, 6, 24, 74
AcTopDownFlow class 11 overview 4
ActualPageNumber constant 137 predefined methods in 30
Actuate Basic xxv, xxix programming language for 18
breakpoints and 123 XML extensions 230
calling C functions 310, 313, 314 Actuate home page xxvii
Index 511
aggregate controls selection guidelines for 329–331, 337
retrieving content for 72 setting up client stations for 340, 341
AIX C++ compilers 338 uninstalling class libraries for 423
AIX servers 340 application servers xxiii
Alias keyword 313 applications
aliases 265 See also programs
getting parameter 382, 430 accessing external 292, 304
nonstandard names 313 adding ActiveX controls to 474, 483
user-defined types as 275 building
aligning with Requester API 350–357
browser code output 207 calling stored procedures from 188
AllocateCursor method 85, 189 closing 353
allocating database cursors 85, 189 customizing xxv, 327
alternate names. See aliases debugging tools for 116
AlternateText property deploying on Web 250
Actuate Viewer and 214 deploying to client/server 334
browser scripting controls and 205, 208 determining web context for 211
displaying 208 developing 251, 256
dynamically generating values for 210 with Actuate APIs 326, 329, 334, 464
PDF formats and 213 developing with ActiveX controls 482
setting in Factory 212 distributing 474
AltKey setting 158 e.reporting solutions for xxii, xxiii
ambiguous methods calls 41 embedding prebuilt functionality 474
ampersand (&) character in code 266 generating reports from 380, 428
analysis tools xxv, 327, 462 hanging 475
analyzing data xxvi including ActiveX controls with 486
ancestor classes. See super classes running Requester API 338, 339, 340
And operator 255 sample xxviii
ANSI character codes 269 search extensions for 327
ANSI strings 269 selecting clients 409
ANY_TP type 471 standard interfaces and 20
AnyClass type 36 support for third-party 462
assigning 34 testing 122
ANYCLASS_TP type 471 archive driver xxvi
apostrophe (’) in code 256 archiving tools xxvi
applets 202 arguments 283
application programming interfaces (APIs) See also parameters
See also specific Actuate API C functions and 311, 312, 313, 314
accessing 337 executable file as 352, 353, 358
choosing libraries for 338, 488 file names as 343
closing sessions for 353, 356 getting names 345
developing with xxvi passing variables as 284
error checking for 349–350 procedures and 283, 285
file naming conventions 339, 488 type restrictions for 312
initializing sessions 351, 355 arithmetic operators 254
overview 326–328 variants and 268
programming tasks for 341
Index 513
BrioQuery 327, 462 building ActiveX sample application 482
browser code building context-sensitive help 163
adjusting scaling factor 212 building data streams 6, 76–82
aligning output for 207 building reports 4, 64
clipping output for 206–207, 213 report bursting techniques for 238, 239,
converting to PDF formats 213 240
creating output dynamically 214 starting Factory process for 66–67
debugging 208 with stored procedures 171, 176
determining execution context 211 built-in classes
displaying 208, 221 See also Actuate Foundation Classes
generating dynamically 210–213 built-in functions 250, 285
including in report designs 205, 209 See also functions; methods
supported formats 202 built-in methods 30, 251
browser code functions 202, 211 See also methods
browser scripting controls BundleReportInstance method 480, 493
adding 205, 209, 210, 214 bundling report files 493
to libraries 210, 215 Burst1.rod 240, 241
adjusting size 212 Burst2.rod 240, 244
creating HTML forms with 210 bursting 238
hiding 215 examples 240
nesting in designs 214, 215 button controls 483
overview 202 byte arrays 269
referencing global browser code in 209 byte type 318
browser source viewer 208 BYTE_TP type 471
BrowserClipping property 206, 207, 222 bytes 269
BrowserCode method ByVal keyword
overriding 210, 211, 212 arrays and 315
setting in Factory 212 C functions and 312, 315
BrowserCode property
checking values of 208 C
setting 205 C functions
BSTR strings 337, 368 aliasing names for 313
BSTR, defined 368 argument types for 312, 313
buffers 10 calling 310, 314
Build and Run command 65, 119 declaring 311–314
Build method including in programs 310, 311
AcReport 67 overview 310
AcReportComponent 68 passing conventions for 312, 315–316
AcReportSection 69 pointers to 276
build number 404, 449 renaming 313
BuildFromRow method return values for 311
AcControl 72 reversing array dimensions 315
AcFrame 71 type conversions 313–314, 316
AcGroupSection 71 C++ compilers 338
AcReportComponent 68 C++ function calls 326, 327
example for report bursting 242 C++ sample application 351
overriding 210, 212, 213
Index 515
classes (continued) deploying to 334
checking object status within 44 developing 335, 336
customizing 35 displaying reports for 501, 502, 503, 504
declaring 18–20 installing ActiveX controls for 488
scope and 21 installing custom search extensions
variables private to 26 for 466
defined 18 moving through reports 478
defining characteristics of 6 running from Requester API 340, 341
defining for Java 317 running on different platforms 330
defining structure of 6 running reports for 353
deriving new 4, 20 selecting clients for 409
determining scope 22 setting up accounts for 352
displaying list of 35 client code 409
displaying variables in 50 Client Integration Technology xxv
extending functionality of 4, 6, 30 client-side reporting 409
getting information about 48, 49 Clip property 207
inspecting 48–49 clipping
instantiating 74–75 browser output 206, 213
making private 49 frames on report pages 73
methods declared in 30 ClipToControlSize setting 207
naming 40, 257 CLng function 277
nesting 21, 23 clock 273
overriding methods and 57 Close function 463, 468
overview 4, 17, 18 Close method 306
referencing 20, 22 CloseReportExecutable method 480, 495
relationships described 20 CloseReportInstance method 478, 484, 495
scope-resolution operator for 22 closing
subprocedures in 282 API sessions 353, 356
testing status 44 class libraries 366, 423
types described 4, 6 connections 68, 70, 353
user-defined types as 276 data adapters 78, 81
viewing properties 51 data streams 68, 70
visibility 20 external applications 306
classifying data 264 input data sources 80
CLASSPATH variable 317 OLE Automation objects 306
cleanup code report files 376
API functions for 342, 353 reports 477, 484, 495
Factory services 66 search definition files 468
search extensions 463 clusters xxv
cleanup functions 310 code
clearing See also Actuate Basic
breakpoints 123 accessing Java objects in 318
programs from memory 125 accessing variables in 26
status stack 503 adding breakpoints 123
client applications 329 adding comments 256
closing 353 conventions for 256–258
creating 351, 354 debugging 115
Index 517
Component Gallery (Visual C++) 475 customizing 83, 85
Component Properties command 49 establishing report server 334, 351
component references (defined) 68 failing 84
component relationship map 66 flat files 95
components generic 5
adding handling multiple 84
in Design Editor 22 implementing programmatically 478
to report designs 251 implementing through API functions 376,
appearing in structure pane 5 425, 495
creating 68 input data sources and 80
at runtime 104–106 instantiating 8, 69, 83
customizing 4 local reporting and 354
instantiating 75, 104 multiple requests and 357
referencing 68, 74, 78 precedence 84
returning references for 112 relationships for 85
Components command 483 sharing 83
compressed images 301 SQL databases and 84
computed columns ConnectToServer method 478, 495
getting values for 90–91 Const statement 267
concatenation operator (&) 256 constants 253, 258
concrete classes 6 declaring 267
conditional expressions 382, 430 default values as 383
conditional filters 91, 92 enumerations and 265
conditional statements type definitions and 265
control structures as 286 constructs 257
setting at runtime 28 container applications
conditionally instantiating components 75 See also OLE applications
conditions accessing data in 294
applying to properties 108, 110 accessing OLE objects in 304
control structures and 286 defined 292
instantiating components with 104 container objects
configurations 326 adding 296, 297, 298
data streams 76 creating content for 68
local 336 embedding objects in 5
printers 348 instantiating contents 75
Requester API and client-server 335 monitoring contents 126
conjunction 255 containers
connection classes 5, 8 frames as 12
connection components reports as 7
adding 85 content management systems xxiii
placing in data streams 83, 84 content structure (Factory) 67
placing in sections 83, 84 content-creation protocol (Factory) 67–72
connection handles 376, 426 Contents buttons 485
connections 83–86 Contents window 475
API applications and 334 opening 485, 506
as transient objects 45 Contents_Click event 485
closing 68, 70, 353 context block (scripting control) 203, 205
Index 519
creating context menus 160, 161 opening 80
creating context-sensitive help 163 custom browser code
creating queries adjusting scaling factor 212
for report bursting 242 aligning output for 207
creating reports clipping output for 206–207, 213
report bursting techniques for 238, 239, converting to PDF formats 213
240 creating output dynamically 214
with stored procedures 171 debugging 208
creating stored procedures 171–174 determining execution context 211
for Oracle8 data sources 182–188 displaying 208, 221
criteria. See parameters generating dynamically 210–213
cross-platform reporting xxiv including in report designs 205, 209
crosstabs 4 supported formats 202
CSng function 277 Custom Browser Code Editor 209, 210
CSS attributes 207, 222 custom classes 35
CStr function 277 custom data sources
CtrlKey Bor AltKey setting 158 creating 80, 81
cumulative totals 262 flat files as 94, 95, 96
currency generating computed columns from 90
converting strings to 384, 399, 432, 444 custom data streams 90–103
getting as current value 399, 443 applying filters to 91–94
getting as default 383, 431 creating 90
setting as default 420, 454 custom methods. See user-defined methods
currency controls 14, 272 custom Requester interface 383, 431
Currency data type custom search extensions 466
assigning values 272, 273 CustomDHTMLFooter method
C functions and 313 overriding 216
converting to 277 CustomDHTMLFooter property
declaring 267 restrictions for 222
described 265 setting 210
returning as current 399, 443 CustomDHTMLHeader method
returning as default 383, 431 overriding 216
specifying parameters as 419, 453 CustomDHTMLHeader property
currency variables 272 restrictions for 222
CURRENCY_TP type 471 setting 210
current date 274 customer profiles xxii
current release xxi Customer Support xxviii
current scaling factor 212 customizing
current value applications xxv, 327
defined 399, 443 components 4
getting 347 connections 83, 84
testing for 396, 398, 442 controls 14, 108
CurrentPage method 478, 496 data filters 81, 92
cursor variables 194, 195 objects 37
cursors (SQL) reports xxv, 31, 89
allocating 85, 189 Requester 366–368, 392, 437
instantiating 9, 85 CVar function 277
Index 521
data sources (continued) mixing in expressions 253
customizing 80, 81 monitoring 126
defined 76 passing multiple 312
external applications as 292, 304 program-specific 265
filtering multiple 98–103 returning 253
flat files as 94 setting as default 347
implementing data adapters for 80 setting search extension 471
instantiating external 6 stored procedures and 179, 198
maintaining data in multiple 295 variants and 267
nonstandard 90 database connection classes 5
overview 80 database cursors
placing connections in 85 allocating 85, 189
retrieving data from 81 instantiating 9, 85
tracking data in multiple 295 database example file
data stream classes 9 for Oracle databases 184
data stream configurations 76 database schema
data streams verifying stored procedures 170
as transient objects 45 databases
building 6, 76–82 accessing
closing 68, 70 for stored procedures 173
connecting to 69, 83 as input sources 76
connection precedence in 84 base class for 9
customizing 90–103 calling stored procedures in 188
getting data rows from 69 connecting to 5, 83–86
instantiating 69 e.reporting solutions for xxii, xxiii
managing data in 10 flat files as 80, 94
placing connection components in 83, 84 frequent operations in 280
reusing 83 improving performance 168
with multiple data adapters 78 interfaces for 5
data type mappings 199 SQL support for 84
data types 264–265 DataInputFile variable 95
See also specific type dataTypes array 472
assigning to parameters 347 DataValue variable 108
assigning to variables 53, 252, 266–267 date controls 14
C functions and 312, 315–316 Date data type
type conversions for 313–314 assigning values 273
class specific 265–267 C functions and 316
constants and 267 converting to 277
conversion functions for 277 described 265
converting Java 318–320 returning as current 400, 444
converting to common type 253 returning as default 384, 432
creating user-defined 275–276 specifying parameters as 420, 454
declaring in procedures 283, 284 date expressions 254
getting as parameter defaults 346 Date function 274
getting report parameter 396, 398, 442 date functions 274
getting specified as current 347 date variables 273
mismatched 268 date/time literals 273, 274
Index 523
DefineProcedureOutputParameter creating with Design Editor 18, 74
method 189, 198 multiple data sources and 99, 102
DELETE queries 86 stacking controls in 214
deleting Desktop ActiveX controls
methods 61 See also ActiveX controls
references to obsolete properties 117 accessing Actuate Basic functions
temporary files 107 from 481
variables 56 adding 474
delimiters (search extensions) 468 canceling report generation from 494
deployment xxiii, xxvii, 250 closing report executables from 495
supported environments for 338 methods calls for 491
derived classes opening report executables 500
creating 20 overview 327, 474
restrictions for 4 running reports from 479, 494, 503, 504
testing for 44 Visual Basic example for 482
descendant classes. See subclasses Desktop control window 484, 485
Design Editor 104 Desktop controls 483
adding components with 22 detail graphs 14
creating multiple input filters 99 detail reports 238
creating reports 251 associating with master reports 243, 245
creating select filters 92 creating from group sections 244, 245
creating sort filters 93 examples for 240, 241, 242, 243
designing reports with 18, 74 naming 243
displaying group section keys 109 Developer Workbench
editing OLE objects 299, 300 setting XML properties 230
getting data from flat files 94 developers 250, 256, 326
inserting OLE custom controls 301 developing applications
inserting OLE objects 297, 298 for Windows operating systems 474
specifying data in 108 with ActiveX controls 477, 482
subclassing reports 239 with Requester API 350–357
Design Emporium product catalog 234 with search extension API 464–466
Design Properties command 120 developing reports xxv, xxxiv
Design Properties dialog development cycles 329
setting debug options 122 development languages xxv
simulating page security viewing 120 development tools xxv, xxvi, 338
design tools xxiv, 251 DHTML converter
designing e.Spreadsheet reports xxv, xxvii generating HTML code 205
designing reports xxiv processing scripting controls 202, 209
testing design 138, 141 properties ignored by 207
with page level security 135–140, 149 scaling controls 212
with stored procedures 171, 176 DHTML forms
designs 251 creating 215
adding browser scripting 205, 209 submitting requests for 217
adding objects from external DHTML reports
applications 292 See also web pages
creating at runtime 104–107 converting to PDF formats 213
creating for flat file data sources 94, 97 debugging browser code for 208
Index 525
documentation xxix debugging tools for 116
accessing xxxii defaults 37
overview xxvii developing for 334
syntax conventions for xxxv editing variables 55
typographical conventions for xxxv extending functionality of 250
dollar sign ($) character in code 267, 273 launching local copy of 336
dot notation 39, 40, 276 local reporting and 336, 355
Double data type programming with 18
assigning values 272, 273 Requester programming examples for 337
C functions and 313, 316 resolving ambiguous method calls 41
converting to 277 selecting client products for 409
declaring 267 transient objects and 45
described 265 e.Report Engine xxvii
Java objects and 318 e.Report Option xxvi
returning as current 401, 445 e.reporting solutions xxi, xxiii
returning as default 385, 433 e.reports 250
specifying parameters as 421, 455 See also reports
double quotation marks in strings 268 e.Spreadsheet Designer xxv, xxvi
double type 318 e.Spreadsheet Engine xxvii
DOUBLE_TP type 471 e.Spreadsheet Option xxvi
double-precision floating-point numbers. See e.Spreadsheet reports
Double data type designing xxv, xxvii
drawing tools 14 generating xxvi
Drawing/Graphics palette 202 E_JAVAEXCEPTIONOCCURRED error 320
DROP TABLE queries 86 E_JVMCLASSNOTFOUND error 320
drop-down menus. See menus E_JVMCLASSPATHNOTFOUND error 320
DT_TIME_TP type 471 E_JVMCREATEJVMFAILED error 320
duplex modes 412 E_JVMCREATEOBJECTFAILED error 320
duplexing 412 E_JVMINVALIDJAVAHANDLE error 320
duplicate names 41, 59 E_JVMMETHODFIELDACCESSFAILED
dynamic arrays 264 error 320
dynamic content delivery 251 E_JVMTYPECONVERSIONFAILED
Dynamic HTML. See DHTML error 320
dynamic hyperlinks editing
creating 358–360 data in OLE objects 294, 295, 299–300
dynamic-link libraries. See DLLs methods 60–61
source code 48
E undoing changes 56
e.Analysis Option xxvi variables 55
e.Business applications xxiii Editor. See Component Editor
e.Report Designer xxiv electronic catalogs xxiii
developing for 334 elements. See arrays
launching local copy of 336 ellipse control 14
local reporting and 336, 355 Ellipsis property 207
selecting client products for 409 Else keyword 286
e.Report Designer Professional xxv ElseIf keyword 286
custom browser code in 202 embedded quotation marks 268, 272
Index 527
Excel applications 299, 304, 462 on report server 500
changing 305 Requester API and 335, 336
creating objects for 305 Visual Basic sample code for 356
searching 327 executing stored procedures 189
support for 292 Exit buttons 484
Excel spreadsheets Exit Do statement 287
developing for xxv, xxvii Exit For statement 287
generating xxvi Exit Function statement 287
exceptions 320 Exit Sub statement 287
exclamation point (!) in code 267 Exit_Click event 484
exclusion 255 explicit declarations 260
executable files 488, 489 exponentiation 254, 273
ActiveX controls and 476 expressions
as report generation argument 352, 353, arithmetic operators and 254
358 assignment statements and 252
bundling with report documents 493 calling procedures from 284, 285
closing 376, 495 comparing 254
copying to client stations 341 conditional statements and 286
described 343 data type functions in 277
generating reports from 377, 408, 426, 452, embedding quotation marks in 272
503, 504 literal strings in 268
getting parameter groups in 391, 394, 437, logical operators and 255
440 operator precedence in 256
getting parameter values in 346 overview 253
getting specific parameter in 392, 395, 438, external applications xxiv
441 accessing data in 294
naming 352, 355 accessing objects in 292, 304
opening 407, 452, 485, 500 closing 306
running 64, 349 opening 305
Execute method external data sources 6, 81
SQL statements 86 external functions
stored procedures 189 calling 310, 314
executing programs 123 copying 360
line by line 123 external hyperlinks
executing queries 86 event handling for 479
executing reports external objects 321
API functions for 348 external security information 134
based on specified parameters 342 external source code files 202
batch mode for 327, 349, 380, 429 Externally Defined Data Type option 54
C++ sample code for 353, 370 extracting data 462, 478
default values and 383, 431 extracting days from dates 274
from ActiveX controls 479, 485, 503, 504 extracting report executables 500
from End User Desktop 410, 453
from parameter values files 352, 353, 355, F
356 F1 key xxxii
locally 336, 349 Factory method 65
sample application for 354
Index 529
FinishFlow event 73 adding OLE custom controls 300
FinishPage event 73 adding OLE objects 296, 297, 298
FirstPage method 478, 496 adding to reports 12
fixed-point numbers 272, 273 building 10
fixed-size arrays 264 building dynamically 104, 105
flat file databases creating content for 6
connecting to 95 defining characteristics of 6
getting data from 80, 94–98 determining page styles for 73
float type 318 generating content for 68, 71, 72
floating-point division 254 instantiating 71
floating-point numbers placing in flows 6
data as 420, 455 placing on pages 73
data types for 272, 273 freeing resources 423
date variables as 273 Function statement
getting as current value 401, 445 C functions in 311
getting as default 385, 434 defining procedures from 281, 282
mathematical operations on 254 functions 250
setting as default 421, 456 See also methods
flow (page layouts) accessing external 310
placing frames in 6 ActiveX alphabetical reference 491
report viewing events and 156 calling 202, 283, 285
flow class 6 from ActiveX controls 480, 493
fonts from DLLs 310, 314
applying to web pages 222 restrictions for 459
footers search extension API and 465
building 74 copying 360
generating content for 72 CPointer data types and 276
For...Next control structures creating mapping 154
counter variables in 272 date/time specific 274
declaring 287 declaring 282
FORM tag 210, 216 in Visual Basic forms 361
Format function 270 error codes for API 389
formatting error handling for 349–350
dates 274–275 exiting 287
displays 265 instantiating classes and 18
strings 270 referencing report files in 343
formatting data Requester API categorized 341–350
for XML reports 226 Requester API reference 375
Formula One product suite xxvii returning object information 44
formulas. See expressions search extension API categorized 462–464
forwarding messages 475 search extension API reference 467
foundation classes. See Actuate Foundation specifying multiple options for 378, 427
Classes stored procedures 182, 184
fractions 272, 273 subprocedures vs. 283
frames 156 type conversions 277
accessing control values in different 113 undocumented 459
adding browser scripting controls 209 fundamental data types. See data types
adding controls 111
Index 531
H generating reports from 327
searching with 14
Halt command 125 Hypertext Markup Language (HTML) 202
hard-coding path names 360 See also HTML
HEAD tags 209
header files (C/C++) 337 I
header files (search extensions)
creating 466 I/O. See input; output
including 469 IBM AIX compilers 338
headers IBM AIX servers 340
building 74 IBM tables
generating content for 72 creating stored procedures 168
help xxxii–xxxiv icons in Variables window 126
building context-sensitive 163–165 identifiers. See symbols
creating balloon help text for 162–163 IDs
providing online 160, 162–163, 165 associated with names 192
help buttons 163 getting object 44
Help command 160, 163 If...Then control structure 286
Help menu xxxii If...Then...Else control structure 286
help topics xxxii image controls 14
HelpText property adding 214
not setting 160 images
hexadecimal numbers 265 accessing from external applications 292
hidden parameters 393, 439 display problems with 301
hide text attribute 394, 440 displaying 107, 214
hierarchy 4, 20 embedding in reports 106, 295
home page (Actuate) xxvii including at runtime 106–107
Horizontal duplex mode 412 linking 294
Horizontal property 207 printing 417
HP-UX compilers 338 scaling 417
HP-UX servers 340 storing in temporary files 107
HTML forms 202 Imp operator 255
creating 210, 222 implication 255
HTML reports implicit declarations 260
See also web pages include files. See header files
dynamically resizing elements in 212 IncludeHeader function 464, 469
HTML tags incorrect values 117
generating 205 indenting code 257
searching for 208 index (online documentation) xxxii
HTTP requests 211 index numbers (arrays) 263
hyperlinks 160 Information Delivery API xxvi
activating context menus for 160 information delivery solutions xxi, xxiii
adding to master reports 243, 245 information objects xxv
copying 160 informational error messages 117
creating dynamic 358–360 Informix tables 8
event handling for 479 inheritance 20
ambiguous methods calls and 41
Index 533
integers Java Native Interface (JNI) 316
See also numbers; integer controls Java objects xxvii
dividing 254 accessing 316, 317–318
floating-point numbers vs. 254 creating 317
overview 272 debugging 321
rounding 253 invoking methods in 317, 318
valid ranges for 265 type conversions for 318–320
integrated content xxiv Java programs
interfaces developing for xxvii
ActiveX controls and 474 Java Runtime Environment (JRE) 316
Actuate programming 326 Java Virtual Machine 316
creating Windows-based 329 JavaScript 202, 222
database-specific 5 debugging 208
enabling/disabling user elements 494 error messages 208
support for standard 20 JDK support 316
internal tools classes 14 JNI support 316
Internet Explorer JRE support 316
example implementation for 215–222
generating output for 211 K
scripting code for 204, 205 key fields 70
BrowserClipping property in 206, 207 See also sort key columns
invalid methods 58 key presses, mouse events and 158
invalid symbols 313 Key property 70
Is operator 44, 45, 255 keys. See sort keys
IsDate function 275 keywords
iServer C functions and 313
building applications for 351 operators as 253
generating reports from 410 restrictions 258
local reporting and 336
making multiple requests 357 L
managing multiple xxv
naming files for 476 label controls 14
overview xxii labels
programming interfaces for 326 changing characteristics of 39
running multiple xxv creating 36, 38
with Requester API 335 DHTML conversions and 203
iServer System Landscape orientation 413
overview xxv language extensions 250
IsKindOf method 44 language symbols 499
issuing requests 342 language. See Actuate Basic
iterators 15, 100 language-specific resources 499
large reports
J report bursting for 239, 240
LastPage method 479, 498
Java applets 202 LAYER tag 205, 222
Java class definitions 317 layouts. See page layouts
Java Development Kit (JDK) 316 LCase function 271
Java exceptions 320
Index 535
long statements 257 menus 14
long type 318 adding items 160
LONG_TP type 471 creating context 159–162
loops 250 creating for web browsers 215, 218
adding to programs 285 displaying context 157
arrays and 263 external applications and 299
exiting 287 merge filters 101
incrementing 287 messages
local variables and 262 See also error messages
nesting 287 forwarding 475
LRX (Live Report Extension) xxvii getting status 497
LTrim function 271 resetting status 503
Method Editor
M creating methods 59
mail dialog box 499 filtering options in 30, 50
mailing report files 480, 499 overriding methods 57
MailReportInstance method 480, 499 starting debugging sessions from 118
maintenance version 404, 449 Method Filtering dialog box 60, 61
Management Console xxv debugging in 118
managing clusters xxv method naming conventions 59
managing displays 6 methods 18, 251
mantissa 273 accessing 39, 310
Manuals directory xxxii ActiveX alphabetical reference 491
MapAcctTypes function 154 ActiveX categorized 477
mapping functions 154 Actuate Basic categorized 30
mapping variable types 198–199 associated with mouse events 157
mapping XML to reports sections 230, 234 calling 40
mark-up tags 226 resolving ambiguity when 41
master reports 238 caution for creating 58
adding hyperlinks 243, 245 caution for overriding 30, 32
examples for creating 240 class protocol for 4
mathematical operations component references and 75
date/time values in 274 creating 58–59
numbers in strings 268 customizing 250
operators for 254 data access 80
variants and 268 debugging 118, 128
matrix arrays 264 deleting 61
Me keyword 280 derived classes and 20
memory 45 displaying 51, 60, 111, 128
clearing programs from 125 dot notation and 39
local variables and 262 editing 60–61
managing external 310 empty 4, 20
OLE objects and 306 executing specific tasks with 252
memory buffers 10 extending functionality of 56
memory cleanup function 310 filtering 52, 60, 61
memory leaks 368 inspecting 51–52
variables in 127
Index 537
naming (continued) NO_TP type 471
executable files 352, 355 NoClipping setting 207, 222
iServer files 476 NoKeys setting 158
local files 476 nonstandard data sources 90
methods 32, 41, 58, 59, 257 nonstandard names 313
procedures 258, 285 non-visual classes 6
search extensions 464, 469 non-zero return values 407, 451
variables 53, 257 not equal to operator (<>) 255
naming conventions 257, 339, 488 Not operator 255
methods 59 Nothing keyword 43, 44
native file systems 476, 479 OLE Automation objects and 306
navigating through reports 478 notifications
ActiveX function calls for 498, 499, 502 report completion 66
navigation methods 478 null character 315
navigational tools 484, 485 Null keyword 315
Contents window as 485 null pointers 315
Navigator. See Netscape Navigator null values 315
negation 255 assigning to objects 43
negative exponents 254 testing for 44
negative numbers 108, 270 NULL_TP type 472
nested classes 21, 23 null-terminated strings 315
nested declarations 20 number sign (#)
nesting 67 in dates 273, 274
class data types 266 type declaration 267
control structures 287 numbers 37
controls 23 See also numeric controls; integers
procedures 257 arithmetic operators and 254
statements 257 computing powers and roots of 254
user-defined type declarations 276 concatenating with strings 256
Netscape Navigator converting
creating reports for 222–223 to character values 253
generating output for 211 to dates 275
scripting code for 205 to strings 270
BrowserClipping property in 206, 207 displaying 108
New keyword 36 dividing 254
New Library dialog 261 getting as current value 401, 402, 445, 446
New method 68 getting as default 385, 386, 434
overriding 104 overview 272
new pages 73 representing colors 265
NewConnection method 83 rounding 253
NewContent method 67 setting as default 421, 422, 456
NewPage method 73 valid ranges for 265
NewPageList method 67 variants and 268
Next buttons 484 numeric constants 253, 258, 267
Next_Click event 484 numeric controls
NextPage method 479, 484, 499 assigning values 272–273
NLS resource DLL 498 instantiating 14
Index 539
OLE controls 14, 474 implementing 161, 164
OLE custom controls overriding 157, 161
accessing 292 OnRButtonUp method 157
adding 300–301 OnRead method
overview 293 overriding 90
OLE objects OnRow method
accessing 304 overriding 108, 112
adding 14, 296–299 Open function 463, 470
changing 294, 295, 299–300, 302 open server 64
compared to OLE Automation objects 304 open server reports
defined 292 invoking functions in 480, 493
linking and embedding 292–299 open server technology xxiv
guidelines 296 OpenConnection method 83
resizing 301 OpenCursor method 183
support for 293 opening
OLE registry 293 Component Editor 49
OLE strings 368 Contents window 506
OLE_TP type 472 executable files 485, 500
OnActuate method external applications 305
default action for 161 files 470
executing 160 input data adapters 81
overriding 161 input data sources 80
OnContextMenu method Library Organizer 261
creating context menus 159 log files 66
default action for 161 report files 342, 407, 452
implementing context-sensitive help 164 reports 477, 485, 500, 501
OnFollowLink method Stack window 129
creating context menus 160, 161 Variables window 126
default action for 161 Watch window 128
overriding 160 OpenRecentReportInstance method 479, 500
OnHelp method 160, 164 OpenReportExecutable method 480, 485, 500
OnLButtonClick method 157 OpenReportInstance method 478, 485, 501
OnLButtonDblClk method 157 operands 253
OnLButtonDown method 157, 158, 358 operating environments 329
overriding 157 operators
OnLButtonUp method 157 assignment 252
online documentation precedence 256
accessing xxxii scope-resolution 22
overview xxvii simple types described 253–256
syntax conventions for xxxv variants and 268
typographical conventions for xxxv optimizing Actuate Basic 267, 272
online help xxxii–xxxiv optional parameters 352
providing 160, 162–163, 165 testing for 442
OnRButtonClick method 157 options 378, 427
OnRButtonDblClk method 157 iServer System xxvi
OnRButtonDown method Or operator 255
default action for 157, 159 Oracle multiple result sets 194
Index 541
parameter values files inspecting 336
ActiveX controls and 476 manipulating in C++ applications 369,
closing 376 370, 373
creating 122, 425, 459 manipulating in Visual Basic forms 363
described 342 methods and no 318
finding specific values in 346 mouse events and 157
generating reports from 377, 408, 426, 452, overloaded methods and 32
504 passing arguments to 284
getting parameter groups in 391, 394, 437, procedures and 283
440 prompting for 366
getting specific parameter in 392, 395, 438, saving 122
441 setting as Currency type 420, 454
opening 407, 452 setting as Date type 420, 455
parameter variables setting as Double type 421, 456
adding 52 setting as Integer type 422, 456
displaying 28, 50 setting as String type 423, 457
overview 25 setting default values for 96
parameterized queries. See stored procedures setting for successive debugging runs 116
parameter-passing conventions 43 setting programmatically 352, 355, 393
C functions and 311, 312, 315–316 stored procedures 171, 177, 179–182
parameters 330 storing 342, 352, 355, 425, 459
See also search parameters testing default assignment 405, 449
adding to image controls 106, 107 testing status 382, 393, 397, 430, 439, 442
assigning values 347, 396, 398, 442 Parameters page (stored procedures) 179, 181
assigning variables as 25, 28 parentheses in expressions 256
changing 336 parsing 208, 269
data filters and 91 passing by reference 284
defining input 189 C functions and 312
defining output 189, 198 passing by value
determining how retrieved 418 C functions and 312
displaying 394, 440 passwords 84, 351
generating reports and 397, 443 in API function calls 343
getting ad hoc 382, 430 obtaining customer xxvii
getting aliases for 382, 430 prompting for 477
getting attributes 345 specifying programmatically 495
getting current values 346, 399, 400, 401, patch number 404, 449
402, 403, 443, 444, 445, 446, 447, 448 PATH system variable 341
getting data types for 396, 398, 442 path variables (UNIX) 340
getting default values for 346 paths 260, 312, 349
getting defaults 383, 384, 385, 386, 387, DLLs and relative 360
388, 431, 432, 434, 435, 436 getting most recent 497
getting group names for 391, 394, 437, 440 hard-coding names in 360
getting names 344 specifying for API libraries 340
from Visual Basic forms 364 specifying in API function calls 343
from Visual C++ forms 369 pattern matching 177–178
getting specific 392, 395, 419, 438, 441 pausing program execution 123
grouping 344, 392, 437 PDF converter 213
Index 543
procedures (continued) progress windows 378, 427
naming 258, 285 projects. See programs
nesting 257 prompts
object reference variables and 37 creating custom dialogs for 366
overloading 285 defining for Requester 383, 431
returning values 43 properties 25, 120
scope 280 browser scripting controls 204, 207, 214
stepping through 124 changing dynamically 108
types listed 280 component references and 74
product suite xxiv conditionally changing 110–113
product updates xxvii displaying 51
program files. See report files methods vs. 58
programmers 250, 256 referencing obsolete 117
programming interfaces setting 26–28, 51
accessing 337 at design time 34
choosing libraries for 338, 488 at runtime 28, 108
closing sessions for 353, 356 conditionally 108
error checking for 349–350 user-defined types and 275
file naming conventions 339, 488 XML-specific 229, 230
initializing sessions 351, 355 Properties page (Component Editor)
overview 326–328 adding variables 55
programming tasks for 341 setting property values 51
selection guidelines for 329–331, 337 viewing properties 51
setting up client stations for 340, 341 Property option 55
uninstalling class libraries for 423 Property setting 25
programming languages xxv, 250, 337 property variables
programming tools xxv, xxvi adding 52
programming. See Actuate Basic; object- inspecting 50, 125
oriented programming overview 25, 26
programs Public option 55
adding C functions to 310, 311 public variables 26
adding source files to 310 publishing data streams 83
clearing from memory 125 publishing XML reports 229–236
controlling execution of 123 PutRow function 464, 470
creating procedures for 280
debugging 116 Q
developing 251, 256 qtrly.dtd 227
improving readability of 285 qualified names 22, 41
resuming execution 124 queries 79
returning incorrect values 117 ad hoc parameters and 382, 430
running 123 creating 81, 86
stepping through 123 for report bursting 242
stopping execution 125 defining cursors for 189
Progress database connections 8, 85 executing 86
Progress databases xxvi instantiating statements in 85
creating stored procedures for 168 overview 85
Progress Option xxvi
Index 545
report executables. See executable files Reporting Engines suite xxiv
report files 342–344 reporting features 329
accessing 376, 426 reporting solutions xxi, xxiii
bundling 493 ReportQuery technology xxiv
closing 376 reports
generating 342 accessing 496
multiple 238 in Encyclopedia volumes 335
generating reports from 408, 452 adding company names and logos 106
mailing 480, 499 as OLE containers 292
opening 407, 452, 485, 500 as OLE servers 292
overwriting 378, 427 building 4, 64
referencing in API function calls 343 starting Factory process for 66–67
server connections and 477 building pages for 6
specifying local names for 476 building subreports for large 238, 239, 240
report object files 343 canceling generation requests 494
report object structure classes 7 closing 477, 484, 495
report objects content/page structures for 67
default scope for 22 controlling access 132, 154
instantiating 6, 7, 66 converting to DHTML 202
nesting classes in 23 counting number of pages in 501
placing on page 11 creating programmatically 251
report parameters. See parameters customizing xxv, 31, 89
report sections debugging 139
accessing data in 153 designing xxiv
creating content for 68, 69 developing xxv, xxxiv
placing connection components in 83, 85 displaying xxvii, 155
report server ActiveX controls and 474, 485
See also e.Reporting Server API functions for 348
accessing report files from 477 as PDF 213–214
accessing volumes 335 in Actuate Viewer 214, 341, 411, 453,
connecting to 334, 351, 495 466
creating parameter values files for 425, in C++ applications 368
459 in Encyclopedia volumes 477
defined 326 in Visual Basic forms 362, 366
generating reports from 365, 377, 418, 426 in web pages 64, 202
opening report files from 407, 452 locally 336, 349, 356
printing from 353, 356, 406, 450 Requester API and 335, 336
running reports from 500 generating xxv, 63, 397, 443
viewing reports on 366, 424, 457 API functions for 377, 426
Report Server API xxvi Factory service and 64, 66, 67
overview 326, 330 from report files 408, 452
selecting DLLs for 339, 340 from Visual Basic forms 362, 365
Report Server Security Extension xxvi, 134 from Visual C++ forms 369, 370
report statistics 66 Requester API and 334
Report Wizard getting content for 76
generating SQL data sources 94 getting generation status for 408
ReportCast xxv getting values at runtime 28
Index 547
requests (continued) RightB function 269
prioritizing 418 right-to-left orientation 505
resubmitting 357 Rogue Wave programs 337, 339
submitting 217, 353, 356, 357 ROI files. See document files; report object
required parameters 352, 355 files
search extensions and 465 RoiFileName parameter
testing for 442 specifying 352, 355
reserved words roiimage.rod 107
C functions and 313 RoiIsTemporary method 238
operators as 253 roots 254
restrictions 258 ROS files. See search definition files
ResetStatus method 503 rotp syntax 335, 353, 476
resizing rounding 253
OLE objects 301 rounding errors 273
resolving ambiguous methods calls 41 routines 408
resources ROV files. See parameter values files
freeing 423 rows. See data rows
loading language-specific 499 ROX files. See executable files
responding to events 156 RoxFileName parameter 349
Result Columns page (stored specifying 352, 355
procedures) 175, 176 royalty-free distribution 474
result sets 168 RTrim function 271
accessing multiple 197–198 Run buttons 485
defining cursors for 189 Run_Click event 485
retrieving 175 running programs 123
returning different types 180 line by line 123
with duplicate column names 175 running queries 86
retrieving running reports
data 79, 80, 81, 82 API functions for 348
from data adapters 6, 78 based on specified parameters 342
from data streams 76 batch mode for 327, 349, 380, 429
from external data sources 6 C++ sample code for 353, 370
from flat files 94 canceling requests for 494
from multiple sources 98–103 default values and 383, 431
from nonstandard sources 90 from ActiveX controls 479, 485, 494, 503,
from text files 90 504
data rows from End User Desktop 410, 453
from stored procedures 189 from parameter values files 352, 353, 355,
with database cursors 85 356
return values 282, 283 locally 336, 349
C functions and 311, 316 sample application for 354
checking for errors with 350 on report server 500
getting from stored procedures 189, 192, Requester API and 335, 336
194 Visual Basic sample code for 356
printing functions and 407, 451 running stored procedures 189
procedures and 43, 284 RunReport method 480, 485, 503
Right function 269 RunReportWith Parameters method 480
Index 549
sections editing in 299
accessing data in 153 OLE linking for 292
adding data rows 71 Server Integration Technology xxv
building 10 server-based reporting xxiv
creating content for 68, 69, 70 servers
determining page styles for 73 accessing files 376, 426
mapping XML properties to 230, 234 accessing report files from 477
page creation process and 72 connecting to 5, 8, 334, 351, 376, 425, 495
placing connection components in 83, 84, disconnecting from 353, 377
85 e.reporting solutions for xxiii
secure read privilege 154 generating reports 377, 426
security 132–135, 336 managing clusters for xxv
customizing ACLs for 153–154 opening report files 407, 452
customizing security IDs 151–152 printing reports 406, 450
debugging with page 120 programming interfaces for 326
e.reporting solutions for xxiv referencing in API function calls 343
enabling page-level xxvi Set statement
example for implementing 149–151 compared to Let statement 43
implementing 135–140 New keyword and 36
server connections 351 Nothing keyword and 43
security IDs 133 object reference variables in 42
access control lists for 133 OLE Automation objects 305, 306
adding 134 SetDataTypeInfo function 464, 471
customizing 151–152 SetParameters function 463, 472
displaying 140 SetScaleFactor method 479, 485, 505
getting 134 SetSecurity method 153
suppressing 153 setting properties 26–28, 51
testing 138 See also properties
security role 133 at design time 34
security tools xxvi at runtime 28, 108
SeekBy method 79 conditionally for controls 108
SeekTo method 79 XML documents 229, 230
SeekToEnd method 79 setting watches 127
select filters 92–93 SetupDataRow method 82
SELECT statements 85 SetValue method 82
See also SQL statements SetWindowLayout method 479, 505
selecting shared libraries 310, 312
stored procedures 177 selecting for API files 340
selection formulas. See parameters shared tasks 280
selection state toggles 158 sharing connections 83
separation character (:) 257 sharing data 292, 304
sequential data access 79 shift parameter 158–159
serial numbers 274 ShiftKey Bor AltKey setting 158
server ShiftKey Bor ControlKey setting 158
accessing volumes 351 ShiftKey Bor CtrlKey Bor AltKey setting 158
server applications 329 ShiftKey setting 158
deploying to 334 SHLIB_PATH variable 340
Index 551
SQL data sources (continued) described 252
filtering 81 executing conditionally 286
filtering multiple 99, 101 executing series of 283
improving performance for 168 fixing errors in 117
instantiating 10 incorrectly constructed 116
overview 85 instantiating classes and 18
reading columns in 82 monitoring 123
retrieving data from 10, 79, 80, 94 nesting 257
SQL statements programming conventions for 257
See also queries repeating indefinitely 286
as stored procedures 168 static controls 13
creating 86 static fields 317, 318
instantiating 85 static methods 318
overview 85 Static statement 260
running 86 creating static variables 24
square roots 285 declaring local variables 262
SrchDef directory 463 declaring object reference variables 34
SrchExt directory 463 static text 14
stack 497, 503 static variables 25
Stack window 128 creating 24, 54
opening 129 declaring 260
stacking controls 214 scope 55
standard data types. See data types visibility 20
Start method statistics 66
AcControl 72 status codes 408
AcDataAdapter 78 status information 408
AcDataFilter 81 status messages 497
AcDataSource 80 resetting 503
AcFrame 71 status stack 503
AcGroupSection 71 status strings 481
AcReportComponent 68 Step Into command 124
AcReportSection 69, 83 Step Into icon 124
overriding 66, 90 Step Over command 124
for flat file access 97 Step Over icon 124
for multiple data sources 100 stepping over code 124
StartFlow event 73 stepping through code 123, 125
starting stopping debugging sessions 125
Component Editor 49 stopping program execution 125
debugging sessions 118 stored functions 182, 194
Factory services 65, 66 example for 184
StartNextSet method 189 Stored Procedure Browser 170, 174
StartPage event 73 Oracle tables and 182
startup code stored procedure components 168
API functions for 342 Stored Procedure Data Source Builder 182
Factory services 66 accessing 169
search extensions 463 entering parameters 179, 180
statements 250 narrowing procedure list 177
defining blocks of 286 overview 168
Index 553
subclasses 4 invalid 313
declaring 18 Synchronize Stored Procedure command 177
object reference variables and 35 Synchronize Stored Procedure With Schema
redefining methods in 20 icon 170
testing for instances of 44 synchronizing stored procedures 170, 177
subclassing 20 synchronous mode 378, 427
abstract base classes 4 synchronous report generation 379, 381, 428,
inherited properties and 28 429
OLE components 302 syntax
reports 239 See also declarations
stored procedures and 193 C function declarations 311
submitting requests 217, 353, 356, 357 Class statement 18
subpages 11 CreateJavaObject function 317
subprocedures Function statement 282
See also Sub statement local file names 476
C functions as 311 method calls 40
calling 284 object reference variables 34, 39, 42
declaring 282 server names in API function calls 343
defining as global 281, 282 Set statement 36
exiting 287 Sub statement 282
functions vs. 283 Typedef statement 275
initializing variables in 262 syntax conventions (documentation) xxxv
subreports 83 syntax errors 116
HTML documents 239 SysFreeString method 368
substrings System Properties dialog 317
comparing 270
concatenation and 256 T
getting 269 Table of Contents 475
subtraction operator (–) 254 opening 485, 506
successive debugging runs 116 TableOfContents method 479, 485, 506
SuggestRoiName method 243, 245 tables
summary graphs 14 getting from stored procedures 194
SunOS operating systems 340 tabular reports 4
Super keyword 40 tags 226
superclasses technical assistance xxviii
class relationships and 20 telephone numbers 268
overriding methods and 57 templates
referencing methods in 40 classes as 18
restrictions for 21 temporary calculations 262
suspending code execution 123 temporary files 107, 352, 353, 355, 357
Sybase tables deleting 107
accessing stored procedures in 189, 193 temporary objects 45, 304
connecting to 8, 85 terminating database connections 84
stored procedures and 168, 180 terminating server connections 353, 377
symbols 21, 253 testing applications 122
C functions and 312
Index 555
user-defined types 275–276 storing 260
C functions and 315, 316 global variables for 113
described 265 methods and 29
user-defined variables 276 objects and 39
run-time 25
V testing assignment 44
V_CURRENCY type 199 testing for 396, 398, 405, 442, 449
V_DATE type 199 valid ranges 265, 274
V_DOUBLE type 199 variables and 37, 38
V_INTEGER type 199 Variable property 26
V_LONG type 199 variable type mappings 198–199
V_SINGLE type 199 variable-length arrays 264
V_STRING type 199 variable-length strings 268
validating connections 351 variables 18, 250
validating user names and passwords 496 See also global variables; local variables;
ValueExp property 82 object reference variables
calculated variables and 91 accessibility 125, 260
values accessing 39
assigning to parameters 347, 396, 398, 442 arguments as 283
assigning to variables 42, 43, 252 assigning data types to 53, 252, 266–267
changing dynamically 108 assigning null values 43
changing variable 284 assigning strings to 268
defining at design time 431 assigning to objects 24, 42
determining if current 399, 400, 401, 402, assigning to parameters 25, 28
403, 443, 444, 445, 446, 447, 448 assigning to variables 37, 38
displaying as hidden text 394, 440 assigning values 42, 43, 252
generating at runtime 104 attaching to classes 35
getting at runtime 28 as any class 36
getting current 347 with Component Editor 53
getting default 346 caution for using global 113
getting for code elements 31 changing values 284
getting incorrect 117 classifying data stored in 264
getting unknown 180 class-specific 24–29, 50
limiting access to 393, 439 constants vs. 267
monitoring 125 counters as 272
null 43, 44 creating 53–55, 261
placing limitations on 265 data rows and 81, 82
returning 282 declaring 260–263
from a single row 78, 80, 81 as global 261
from all rows 78 as local 262
from nonstandard sources 90 as private 26
from procedures 283 as public 26
from stored procedures 189, 192, 194 as specific type 266
object variables and 39 as static 24
subprocedures and 284 C++ sample code for 351
searching for specific 462, 505 type-declaration characters and 266
setting as defaults 347 user-defined types and 276
Index 557
viewing (continued) type codes for 199
error messages 117 Visual Basic programs
images 107 customizing Requester interface 383, 431
methods 51, 60, 111, 128 Visual C++ 475
online documentation xxxii Visual C++ compiler 466
predefined classes 35 Visual C++ forms 369
properties 51 visual classes 6
report parameters 394, 440 visual components
reports xxvii, 155, 424, 457 instantiating 6
ActiveX controls and 474, 485 visual distortion 208
API functions for 348 visual objects 156
in C++ applications 368 void type 319
in Encyclopedia volumes 477 volumes 326
in Visual Basic forms 362, 366 accessing 335, 351
in web pages 64, 202
locally 336, 349, 356 W
Requester API and 335, 336 Watch command 128
with Actuate Viewer 214, 341, 411, 453, Watch window 127
466 opening 128
with PDF converter 213–214 watches 127
with security restrictions 134 weak cursors (defined) 182, 194
variables 50, 125 Web applications 250
web pages 212 web browsers
viewing events 156–157 aligning output for 207
viewing methods 478 creating menus for 215, 218
viewing window (ActiveX) displaying online documentation in xxxii
changing views in 495 displaying reports in xxvii
displaying reports in 476, 479, 503, 504 example implementation for Internet
moving to specific page in 498, 499, 502 Explorer 215–222
resetting to first page 496 fixing visual distortion in 208
scaling reports for 505 guidelines for Netscape Navigator 222–
views 132 223
visibility. See scope scripting code for 205, 206
VisiblePageNumber constant 137 unresolved references in 209
Visual Basic 250 viewing code for 208
accessing Requester API from 360 web pages
ActiveX controls and 474 See also HTML reports; XML reports
creating Requester interface in 327 adding scroll bars 207
customizing Requester interface 366–368, changing scaling factor for 212
392, 437 debugging browser code for 208
developing with ActiveX controls 482 determining application context 211
generating and printing reports from 361– displaying reports for 64, 202
366 getting URLs for 497
initializing Requester API for 362 navigating through 484, 492, 493
running End User Desktop from 410, 453 specifying clipping for 206
sample application 354 viewing 212
selecting Actuate API for 337
Index 559
560 Programming e.Repor ts