Description

Runs the designer after asking the user to select (or provide) a template file.

Return Type

A String value.  

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

Syntax

object.OpenTemplate ([TemplateType], [TemplateFileName], [DataSource])

The OpenTemplate 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 template to open. 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 template report.

TemplateFileNameOptional. A String value.

String : For mcrtAny, this file will be opened by the designer, for editing. Otherwise, the template will be selected automatically or by the user depending on TemplateType.

DataSourceOptional. A Variant value.

Optional. Will be used to display sample data if present and select a template when TemplateType is mcrtDefault or mcrtDefaultPrint.

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.