A container and controller of report elements.

Syntax

[<oRef> =] new Report( )

<oRef>

A variable or property in which you want to store a reference to the newly created Report object.

Properties

The following tables list the properties, events, and methods of the Report class.

Property

Default

Description

autoSort

true

Whether to automatically sort data to match specified groups

baseClassName

REPORT

Identifies the object as an instance of the Report class

className

(REPORT)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

endPage

–1

Last page number to render (–1 for no limit)

elements

 

An array containing object references to the visual components on the reports

firstPageTemplate

 

Reference to the first PageTemplate object, which describes the first page

inDesign

 

Whether the report was instantiated by the Report designer

mdi

 

Whether the report window is an MDI window

metric

Twips

Units of measurement (0=Chars, 1=Twips, 2=Points, 3=Inches, 4=Centimeters, 5=Millimeters, 6=Pixels)

output

Default

Target media (0=Window, 1=Printer, 2=Printer file, 3=Default, 4=HTML file, 5=CGI Response)

outputFilename

 

Name of file if output goes to printer, HTML file, or CGI

printer

 

An object describing various printer output options

reportGroup

 

Reference to a Group object for the report as a whole, for master counts and totals

reportPage

 

Current page number being rendered

reportViewer

null

Reference to the ReportViewer object that instantiated the report, if any.

scaleFontBold

false

When the metric is Chars, determines whether the Char units of the ScaleFont assume that the font is bold

scaleFontName

Arial

When the metric is Chars, the typeface of the font used as the basis of measurement

scaleFontSize

10

When the metric is Chars, the point size of font used as the basis of measurement

startPage

1

First page number to output

title

 

Title of the report; appears in the title bar of the preview window

usePrintingDialog

true

Whether or not report's  Printing Dialog willt be displayed while rendering report.

Event

Parameters

Description

onDesignOpen

 

After the report is first loaded into the Report Designer

onPage

 

After a page is rendered

Method

Parameters

Description

close( )

 

Closes the report window

isLastPage( )

 

Determines whether there are any more pages to render

release( )

 

Explicitly releases the Report object from memory

render( )

 

Generates the report

Description

A Report object acts as the controlling container for all the objects that make up the report, including data access, page layout, and data stream objects.

The reportGroup property refers to a report-level Group object that can be used for report-wide summaries. This Group object is created automatically.

To generate the report, call its render( ) method. The report’s output property determines where the report is rendered: to the screen, a printer, or a file. The report’s printer object contains properties that control output to a printer (or printer file). Call the printer object’s choosePrinter( ) method before calling render( ) to allow the user to choose a printer.

You can control the pages that are output by setting the startPage and endPage properties.