SAIF.Services.Printing operations and processes¶
This page is the operation catalog and cross-operation hub for SAIF.Services.Printing. The library exposes nine operations across two independent transport paths — an xPression SOAP/MSMQ path (clsPrint, consumed directly or through the IReport/ReportBase workflow) and an SSRS SOAP path (clsRSPrint) — plus a standalone XML serialization step used to prepare xPression payloads. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
|---|---|---|---|---|---|
| Preview document via xPression | Render xPression output as preview bytes, via design-mode PDF preview or profile-based document preview | Caller invokes clsPrint.previewPDF or previewDocument |
Package name, XML payload, optional output profile | Preview byte array | BR-007 |
| Print rendered PDF | Send an already-rendered PDF byte array to the configured printer | Caller invokes clsPrint.printPDF with rendered bytes |
PDF bytes, printer settings | Boolean success | — |
| Distribute document (synchronous or asynchronous) | Send a distribution request directly to xPression or queue it transactionally in MSMQ | Caller invokes clsPrint.distributeDocument |
Package name, XML payload, printer and delivery settings | Boolean success | BR-001, BR-002, BR-007 |
| Render report | Create or reuse rendered report bytes through the IReport workflow |
Caller invokes ReportBase.Render, or Print/Distribute/Save invoke it internally |
Report package, report XML (via Create), output profile |
Cached rendered bytes | BR-003, BR-004 |
| Print report | Render if needed, then print through clsPrint |
Caller invokes ReportBase.Print |
Printer name, optional overwrite flag | Boolean success | BR-004 |
| Distribute report | Create report XML if needed, then distribute it through clsPrint |
Caller invokes ReportBase.Distribute |
Optional overwrite flag | Boolean success | BR-001 |
| Save report | Render if needed and persist report bytes to disk | Caller invokes ReportBase.Save |
Destination file path, optional overwrite flag | Saved file | BR-004 |
| Preview SSRS report | Render a parameterized SSRS report through the SOAP execution service | Caller invokes clsRSPrint.PreviewDocument |
Report path, optional parameters, selected format | Rendered report bytes | BR-006 |
| Serialize XDesign XML tree | Convert the report XML tree into xPression-compatible markup, propagating keys | Caller invokes XDesignXDocument.ToXpression or XDesignXElement.ToXpression |
XDesignXDocument or XDesignXElement |
Serialized XML text | — |
Process flow diagram¶
The following diagram shows how a consumer moves from an IReport-derived report through rendering to print, distribution, or saving, and how the standalone xPression and SSRS entry points relate to it.
flowchart TD
Start([Consumer holds an IReport<br>or calls clsPrint/clsRSPrint directly]) --> Which{Which workflow?}
Which -->|IReport workflow| Render[Render report:<br>Create XML, resolve printer,<br>call preview service]
Render --> Serialize[Serialize XDesign XML tree<br>ToXpression]
Serialize --> Action{Caller action?}
Action -->|Print| Print[Print report]
Action -->|Distribute| Dist[Distribute report]
Action -->|Save| Save[Save report]
Print --> PrintPDF[Print rendered PDF]
Dist --> DistDoc[Distribute document<br>sync or async]
Which -->|Direct xPression call| PreviewDirect[Preview document via xPression]
Which -->|Direct xPression call| DistDoc
Which -->|Direct xPression call| PrintPDF
Which -->|SSRS| SSRS[Preview SSRS report]
Database interactions¶
SAIF.Services.Printing does not perform any direct database access. All operations communicate with the xPression document-generation SOAP service, an MSMQ queue, or the SSRS ReportExecutionService SOAP endpoint; no database-tables.md or SQL catalog exists for this library.
Failure and edge-case behavior¶
- Render report returns
Falseand records anErrorDetailwhen exceptions occur during rendering, and also returnsFalsewithout an error entry when report XML or the report package is missing afterCreate. - Print report and Save report do not proceed to print or write a file when rendered bytes are unavailable after a render attempt.
clsRSPrint.DistributeDocumentalways throwsNotImplementedException(BR-006); SSRS reports must be distributed through the xPression-based Distribute document (synchronous or asynchronous) operation instead.- Asynchronous Distribute document (synchronous or asynchronous) aborts its MSMQ transaction on exceptions before re-throwing the error (BR-002).
- Save report does not guard against a
Nothingrendered-bytes array before writing to disk if rendering failed silently.**
Related documentation¶
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
Services\SAIF.Services.Printing\clsPrint.vbServices\SAIF.Services.Printing\clsRSPrint.vbServices\SAIF.Services.Printing\Reporting\ReportBase.vbServices\SAIF.Services.Printing\Reporting\IReport.vbServices\SAIF.Services.Printing\Reporting\XDesignXDocument.vbServices\SAIF.Services.Printing\Reporting\XDesignXElement.vb