Description

Executes a Preview/Print/Export on a Page or a Table report.

Return Type

A String value.  

the full path name of the selected report template or an empty string if the user cancels.

Syntax

object.PrintReport ([TemplateType], [TemplateFileName], [DataSource], [Destination])

The PrintReport Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McReporter.
TemplateTypeOptional. A mcReportType enumeration, as described in settings.

mcReportType : Specifies the type of report to print. When TemplateType is mcrtDefault or mcrtDefaultPrint, a template will be selected automatically. If TemplateType is set to mcrtAny, the user will be allowed to select the report template.

TemplateFileNameOptional. A String value.

String : For mcrtAny, this file will be used as the report template. Otherwise, the template will be selected automatically or by the user depending on TemplateType.

DataSourceOptional. A Variant value.

Optional. This is the data to report, defaults to ActiveImage.

DestinationOptional. A mcReportDestination enumeration, as described in settings.

optional. The destination of the report, defaults to preview.

Settings

The settings for TemplateType are:

ConstantValueDescription
 mcrtAny0

User will be prompted for the report template is needed.

 mcrtDefault1

A default report template will be selected according to DataSource.

 mcrtDefaultPrint2

A default print template will be selected according to DataSource.

The settings for Destination are:

ConstantValueDescription
 mcrdNone0

The engine will only generate a preview file (.LL).

 mcrdPreview1

The engine will generate a preview of the report. (The preview can be printed afterward, or saved in a preview file).

 mcrdPrint2

The report will be printed on a user selected printer.

 mcrdExport4

The user will be given the choice of several export formats: file, RTF, HTML, PDF, MIME HTML, XML, Bitmap, JPEG, Enhanced Metafile.

 mcrdAll7

Preview, Print, Export combined.

 mcrdPrintDefault8

The report will be printed on the default printer without prompting.