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

For example:

CrystalReport1.Password = “dogsncats”

«Enters the password dogsncats

Data Type

String

Availability

Runtime

Remarks

Enter the password you have been assigned.

In Microsoft Access 95 and later, an Access database can have session security (also know as user-level security), database-level security, or both. If the Access database contains only session security, simply pass the session password to the Password property. If the Access database contains database-level security, use a linefeed character, Chr(10), followed by the database-level password. For example:

CrystalReport1.Password = Chr(10) & “dbpassword”

If the Access database contains both session security and database-level security, use the session password followed by the linefeed character and the database password:

CrystalReport1.Password “sesspswd” & Chr(10) & “dbpassword”

Alternately, database-level security can also be handled by assigning the database-level password to the Password parameter of the LogOnInfo, Page 205, property.

Related Report Engine Functions

PESetNthTableSessionInfo, Volume 2, Chapter 1

PrintDay

PrintDay specifies the day component of the print date (if different from the actual date the report is printed).

Syntax

[form.]Report.PrintDay[=Day%]

For example:

CrystalReport1.PrintDay = 23

«Sets 23 as the print day.»

Crystal ActiveX Control Reference

211

Remarks

Enter a value from 1 to 31.

PrintYear, Page 229, PrintMonth, Page 228, and PrintDay work together to define the date that the report is to be printed. All three properties must be set in order to define a new print date. If all three properties are not set, the date saved with the report is used. This may be the user’s default date if none has been specified in 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

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetPrintDate, Volume 2, Chapter 1

PrinterCollation

PrinterCollation indicates whether or not copies will be collated when printed, if more than one copy is to be printed. Use PrinterCopies, Page 213, to specify how many copies should be printed.

Syntax

[form.]Report.PrinterCollation[=CollationCode%]

For example:

CrystalReport1.PrinterCollation = 1

«Collates the copies of the specified report.»

Remarks

Select your CollationCode% value from the following table:

Status

Code

 

 

 

 

Uncollated

0

 

 

Collated

1

 

 

Default Collation

2

This property/method is not available for subreports.

Crystal ActiveX Control Reference

212

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

Data Type

Integer (Enumerated)

Availability

Design Time; Runtime

Related Report Engine Functions

PESetPrintOptions, Volume 2, Chapter 1

PrinterCopies

PrinterCopies specifies the number of report copies to be printed. PrinterCollation, Page 212, indicates whether or not the copies will be collated when printed.

Syntax

[form.]Report.PrinterCopies[=NumCopies%]

For example:

CrystalReport1.PrinterCopies = 3

«Specifies that the program is to print three copies of the report.»

Remarks

The number used for PrinterCopies must not be zero or a negative value.

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

Crystal ActiveX Control Reference

213

PrinterDriver

PrinterDriver specifies the name of the printer driver that is to be used when the report is printed.

Syntax

[form.]Report.PrinterDriver [= DriverName$]

For example:

CrystalReport1.PrinterDriver = “Epson24.drv”

«Sets the printer driver to be the Epson 24 pin driver.»

Remarks

PrinterDriver, PrinterName, Page 215, 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

214

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