Skip to main content

ISalReport

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.50 (5.0.0.0)

Defines the common preview, print, export, binding, and printer contract for report providers.

public interface ISalReport

Example:

using PPJ.Runtime;

class PreviewExample
{
public static int Show(ISalReport report)
{
report.DocumentName = "Sales report";
return report.Preview(null, 0);
}
}

Properties

Instance member DocumentName

String: Gets or sets the print-job document name.

Instance member FileName

String: Gets or sets the source report or template file path.

Instance member InputItems

String: Gets or sets the comma-separated report input-item names.

Instance member LastPageNumber

Int32: Gets the provider's last report-page number.

Availability and pagination timing depend on the provider.

Instance member Owner

Control: Gets or sets the control that receives report notifications.

Instance member PrinterSettings

PrinterSettings: Gets the settings used to print the report.

Instance member ProgressCaption

String: Gets or sets the progress-dialog caption.

Instance member ProgressText

String: Gets or sets text displayed in the report progress dialog.

Providers may use two lines separated by CRLF.

Instance member ReportDocument

Object: Gets the underlying provider-specific report document.

Instance member TableWindowSource

SalTableWindow: Gets or sets the SAL table used as the report data source.

Instance member Variables

String: Gets or sets the comma-separated report-variable bindings.

Instance member Viewer

Control: Gets the active report-viewer control, when available.

Methods

Instance member ClosePreview()

Closes the active preview window.

Instance member Create(file)

Creates a report file from the configured template and data bindings.

ParameterTypeDescription
fileStringThe destination report or export file path.

Returns: Int32. Zero on success, or a provider report-error code.

FileName selects the source template; an empty value selects the provider's built-in template.

Instance member DoPreviewCommand(command)

Dispatches a SAL report command to the preview window.

ParameterTypeDescription
commandInt32A Sys.RPT_Cmd* command code.

Instance member Export(file, firstPage, lastPage, options)

Exports the requested page range to a file.

ParameterTypeDescription
fileStringThe destination report or export file path.
firstPageInt32The first page in the requested range.
lastPageInt32The last page in the requested range; provider conventions determine an open-ended range.
optionsInt32The SAL report option flags interpreted by the provider.

Returns: Int32. Zero on success, or a provider report-error code.

The provider selects the export format from the file extension.

Instance member GetReportVariable(name)

Reads a named report variable.

ParameterTypeDescription
nameStringThe report variable name.

Returns: Object. The provider's value for the named variable, or its missing-value result.

Instance member Preview(parent, options)

Displays a report preview in a parent control or a new top-level window.

ParameterTypeDescription
parentControlThe preview host, or null to create a top-level preview.
optionsInt32The SAL report option flags interpreted by the provider.

Returns: Int32. Zero on success, or a provider report-error code.

Prints the requested page range and number of copies.

ParameterTypeDescription
copiesInt32The requested number of printed copies.
firstPageInt32The first page in the requested range.
lastPageInt32The last page in the requested range; provider conventions determine an open-ended range.
optionsInt32The SAL report option flags interpreted by the provider.

Returns: Int32. Zero on success, or a provider report-error code.

Instance member Reset()

Regenerates report data and refreshes the report.

Instance member SetReportVariable(name, value)

Assigns a named report variable.

ParameterTypeDescription
nameStringThe report variable name.
valueObjectThe value to assign.

Returns: Boolean. True if the provider accepts the assignment; otherwise, false.