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

PrinterName

PrinterName specifies the name of the printer that is to print the report.

Syntax

[form.]Report.PrinterName[= PrinterName$]

For example:

CrystalReport1.PrinterName = “Epson LQ-850”

«Specifies the Epson LQ-850 printer.»

Remarks

PrinterDriver, Page 214, PrinterName, and PrinterPort, Page 216, work together to define the printer that the report is to be sent to. All three properties must be set in order to define a new printer. If all three properties are not set, the printer defined in the report will be used. This may be the user’s default printer if none has been specified in the report.

This property/method is available for subreports.

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

For an example of how to use this property look in the WIN.INI file under the Devices section. You will find something like this:

[Devices]

HP LaserJet 4/4M=HPPCL5MS,hp4_tech_1

The PrinterName is the HP LaserJet 4/4M, left of the = sign

The PrinterDriver is the HPPCL5MS, first variable after the = sign

The PrinterPort is the hp4_tech_1, the second variable after the = sign. Port is often something like “LPT1:”

Data Type

String

Availability

Design Time; Runtime

Crystal ActiveX Control Reference

215

PrinterPort

PrinterPort specifies the name of the printer port for the specified printer.

Syntax

[form.]Report.PrinterPort[= PortName$]

For example:

CrystalReport1.PrinterPort= “LPT1”

«Sets the printer port to LPT1.»

Remarks

PrinterDriver, Page 214, PrinterName, Page 215, and PrinterPort work together to define the printer that the report is to be sent to. All three properties must be set in order to define a new printer. If all three properties are not set, the printer defined in the report will be used. This may be the user’s default printer if none has been specified in the report.

This property/method is available for subreports.

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

For an example of how to use this property look in the WIN.INI file under the Devices section. You will find something like this:

[Devices]

HP LaserJet 4/4M=HPPCL5MS,hp4_tech_1

The PrinterName is the HP LaserJet 4/4M, left of the = sign

The PrinterDriver is the HPPCL5MS, first variable after the = sign

The PrinterPort is the hp4_tech_1, the second variable after the = sign. Port is often something like “LPT1:”

Data Type

String

Availability

Design Time; Runtime

Crystal ActiveX Control Reference

216

PrinterStartPage

PrinterStartPage specifies the first page to be printed.

Syntax

[form.]Report.PrinterStartPage[= StartPage%]

For example:

CrystalReport1.PrinterStartPage = 7

«Specifies that printing is to begin with Page 7 of the report.»

Remarks

If a value less than or equal to 0 is used for PrinterStartPage, the value is ignored and printing starts with Page 1.

This property/method is available for subreports.

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

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetPrintOptions, Volume 2, Chapter 1

PrinterStopPage

PrinterStopPage specifies the last page to be printed.

Syntax

[form.]Report.PrinterStopPage[=StopPage%]

For example:

CrystalReport1.PrinterStopPage = 12

«Specifies that the printing is to end with Page 12 of the report.»

Crystal ActiveX Control Reference

217

Remarks

Use a value of 0 for PrinterStopPage to indicate that printing is to continue through to the last page.

This property/method is available for subreports.

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

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetPrintOptions, Volume 2, Chapter 1

PrintFileCharSepQuote

PrintFileCharSepQuote specifies the quote character used to enclose alphanumeric field data when printing to a file using character-separated format.

Syntax

[form.]Report.PrintFileCharSepQuote[=Quote$]

For example:

CrystalReport1.PrintFileCharSepQuote = “‘”

«Uses the quotation character (‘) to surround values saved in character-separated format.»

Remarks

Applies only when PrintFileType, Page 223, is 5 - Character-separated values.

Applies only when Destination, Page 183, is 2 - File, 3 - E-mail to MAPI, or 4 - E-mail to VIM.

If you assign a string to PrintFileCharSepQuote that is longer than one character, only the first character of that string is used. For example, if you assign “quote” to the property, only “q” is recognized.

This property/method is available for subreports.

Crystal ActiveX Control Reference

218

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