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

Availability

Runtime

Related Report Engine Functions

PESetNthParameterDefaultValue, Volume 2, Chapter 1

SubreportToChange

SubreportToChange specifies whether changes to any of several properties (see list in Remarks below) affect the main report (if you pass an empty string [“”]) or a subreport (if you pass the name of the subreport).

Syntax

[form.]Report.SubreportToChange(= SubreportName$)

For example:

CrystalReport1.SubreportToChange = “”

«Changes to any of the properties apply to the main report.»

CrystalReport1.SubreportToChange = “Subrpt2”

«Changes to any of the properties apply to the Subrpt2 subreport.»

Remarks

The following properties are affected by this property:

Connect

LogonInfo

SectionFont

DataFiles

MarginBottom

SectionFormat

DetailCopies

MarginLeft

SectionLineHeight

 

 

 

Formulas

MarginRight

SectionMinHeight

 

 

 

GraphData

MarginTop

SelectionFormula

 

 

 

GraphOptions

ParameterFields

SessionHandle

GraphText

Password

SortFields

 

 

 

GraphType

PrintDay

SQLQuery

 

 

 

GroupCondition

PrintMonth

StoredProcParam

 

 

 

GroupSelectionFormula

PrintYear

UserName

GroupSortFields

ReportTitle

 

 

 

 

Crystal ActiveX Control Reference

247

If the SubreportToChange property is set to:

¾the empty string, changing any of these properties affects the main report.

¾the name of a subreport, changing any of these properties affects the subreport.

When you change the value of the SubreportToChange property, the current value of the properties in the list are updated to be what has been set for the selected subreport.

Calling the ReplaceSelectionFormula method will apply the new selection formula to the currently selected subreport.

NOTE: These properties only reflect values set by the programmer; they do not get values from the report.

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Data Type

String

Availability

Runtime

UserName

UserName specifies the name given to a user for logging on to a protected Access.mdb file in order to obtain data files needed by the report.

Syntax

[form.]Report.UserName[= Name$]

For example:

CrystalReport1.UserName = “MIS”

«Enters the user name “MIS”.»

Remarks

Enter the name you have been assigned.

The name must be enclosed in quotes if the variable is being assigned at runtime.

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Crystal ActiveX Control Reference

248

Data Type

String

Availability

Runtime

Related Report Engine Functions

PESetNthTableSessionInfo, Volume 2, Chapter 1

WindowAllowDrillDown

WindowAllowDrillDown indicates whether or not drill-down on summary values is allowed in the preview window.

Syntax

[form.]Report.WindowAllowDrillDown[= {True|False}]

For example:

CrystalReport1.WindowAllowDrillDown = FALSE

«Drill-down is not allowed in the preview window.»

Remarks

This property is set to False by default.

Data Type

Boolean

Availability

Design Time; Runtime

Related Report Engine Functions

PESetWindowOptions, Volume 2, Chapter 1

WindowBorderStyle

WindowBorderStyle specifies the type of border for the preview window.

Syntax

[form.]Report.WindowBorderStyle[= BorderStyle%]

Crystal ActiveX Control Reference

249

For example:

CrystalReport1.WindowBorderStyle = 2

«Sets a sizable border style (Style #2) for the preview window.»

Remarks

Select one of the following border styles for the preview window:

0 = None (creates a window with no border).

1 = Fixed Single (creates a window of a fixed size with a single line border).

2 = Sizeable (creates a window that can be resized by the user).

3 = Fixed Double (creates a window of fixed size with a double line border).

Select a value here only if you are printing to a window, if Destination, Page 183, is set to 0.

Data Type

Integer (Enumerated)

Availability

Design Time; Runtime

Related Report Engine Functions

PEOutputToWindow, Volume 2, Chapter 1

WindowControlBox

WindowControlBox to specify whether or not the preview window is to have a control (system menu) box in the upper left hand corner when the report is printed to a window.

Syntax

[form.]Report.WindowControlBox[= {True|False}]

For example:

CrystalReport1.WindowControlBox = True

«Specifies that a control box (system menu) is to appear in the preview window.»

Remarks

Select True if you want the window to contain a control box. Select False if you do not.

Select a value here only if you are printing to a window, if Destination, Page 183, is set to 0.

Crystal ActiveX Control Reference

250

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