Xbasic

OBJECT.PRINT Function

Syntax

Output_Filename as C = :Object_Type.Print(c layoutname [,c filter [,c order [,* arguments [,* options ]]]])

Arguments

Object_Type

This word can be any of the following:

"Browse"
"Form"
"Label"
"Letter"
"Report"
layoutname

The name of a form, browse, label, letter, or report layout.

filter

Optional. Default = all records. An expression that selects records.

order

Optional. Default = record order number. An expression that order the selected records.

arguments

Optional. Default = NULL_VALUE(). Arguments that retrieve value(s) from variable(s) or prompts for value(s) at runtime. Only applicable to SQL Reports. Refer to SQL::Arguments Object

options

Optional. Default = NULL_VALUE(). Sets filter (WHERE) and order (ORDER BY) expressions for a query against a passive-linked table. A pointer dot variable with 2 elements. Refer to Using the Options Argument.

.filter = Adds to the WHERE clause in the underlying SQL expression.
.order = Replaces the ORDER BY clause in the underlying SQL expression.

Description

Displays the Print dialog.

The <OBJECT>.PRINT() method displays the Print dialog, which allows you to select the printer to use to output the selected layout.

Example

form.print("Customer Information", "lastname < 'b'", "lastname")

This script prints the Invoice report with an argument. You can add as many arguments to the arguments collection as you want.

:Report.archive("Invoice")
DIM myargs as SQL::arguments 
 myargs.add("whatcity","London") 
 report.print("report1", "", "", .f., .f., myargs)

Limitations

Desktop applications only.

See Also