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.
- C#
- VB.NET
public interface ISalReport
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
DocumentName
String: Gets or sets the print-job document name.
FileName
String: Gets or sets the source report or template file path.
InputItems
String: Gets or sets the comma-separated report input-item names.
LastPageNumber
Int32: Gets the provider's last report-page number.
Availability and pagination timing depend on the provider.
Owner
Control: Gets or sets the control that receives report notifications.
PrinterSettings
PrinterSettings: Gets the settings used to print the report.
ProgressCaption
String: Gets or sets the progress-dialog caption.
ProgressText
String: Gets or sets text displayed in the report progress dialog.
Providers may use two lines separated by CRLF.
ReportDocument
Object: Gets the underlying provider-specific report document.
TableWindowSource
SalTableWindow: Gets or sets the SAL table used as the report data source.
Variables
String: Gets or sets the comma-separated report-variable bindings.
Viewer
Control: Gets the active report-viewer control, when available.
Methods
ClosePreview()
Closes the active preview window.
Create(file)
Creates a report file from the configured template and data bindings.
| Parameter | Type | Description |
|---|---|---|
| file | String | The 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.
DoPreviewCommand(command)
Dispatches a SAL report command to the preview window.
| Parameter | Type | Description |
|---|---|---|
| command | Int32 | A Sys.RPT_Cmd* command code. |
Export(file, firstPage, lastPage, options)
Exports the requested page range to a file.
| Parameter | Type | Description |
|---|---|---|
| file | String | The destination report or export file path. |
| firstPage | Int32 | The first page in the requested range. |
| lastPage | Int32 | The last page in the requested range; provider conventions determine an open-ended range. |
| options | Int32 | The 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.
GetReportVariable(name)
Reads a named report variable.
| Parameter | Type | Description |
|---|---|---|
| name | String | The report variable name. |
Returns: Object. The provider's value for the named variable, or its missing-value result.
Preview(parent, options)
Displays a report preview in a parent control or a new top-level window.
| Parameter | Type | Description |
|---|---|---|
| parent | Control | The preview host, or null to create a top-level preview. |
| options | Int32 | The SAL report option flags interpreted by the provider. |
Returns: Int32. Zero on success, or a provider report-error code.
Print(copies, firstPage, lastPage, options)
Prints the requested page range and number of copies.
| Parameter | Type | Description |
|---|---|---|
| copies | Int32 | The requested number of printed copies. |
| firstPage | Int32 | The first page in the requested range. |
| lastPage | Int32 | The last page in the requested range; provider conventions determine an open-ended range. |
| options | Int32 | The SAL report option flags interpreted by the provider. |
Returns: Int32. Zero on success, or a provider report-error code.
Reset()
Regenerates report data and refreshes the report.
SetReportVariable(name, value)
Assigns a named report variable.
| Parameter | Type | Description |
|---|---|---|
| name | String | The report variable name. |
| value | Object | The value to assign. |
Returns: Boolean. True if the provider accepts the assignment; otherwise, false.