SAIF.Services.Printing architecture¶
SAIF.Services.Printing separates report composition from transport concerns. ReportBase and IReport define the reusable report workflow, XDesignXDocument and XDesignXElement shape xPression payloads, clsPrint sends xPression print and distribution requests, and clsRSPrint renders SSRS reports through a separate SOAP endpoint.
Responsibilities¶
- Encapsulate xPression document preview, print, and distribution calls.
- Encapsulate SSRS report preview and parameter submission.
- Provide a base report workflow that manages XML creation, file persistence, and error collection.
- Translate report XML into the xPression-specific element structure expected by downstream services.
Component boundaries¶
Reporting.IReport: public contract for report creation, rendering, printing, distribution, and saving.Reporting.ReportBase: reusable implementation of theIReportworkflow that delegates transport work toclsPrint.clsPrint: xPression SOAP client wrapper with synchronous and transactional MSMQ-backed asynchronous distribution paths.clsRSPrint: SSRSReportExecutionServicewrapper for parameterized report rendering.Reporting.XDesignXDocumentandReporting.XDesignXElement: XML document and element wrappers that generate xPression-compatible markup.Reporting.ErrorDetail: error container returned throughIReport.Errors.
Interaction model¶
- Consumers populate
ReportBase-derived reports, then callRender,Print,Distribute, orSavethrough theIReportsurface. ReportBase.Renderselects a default printer throughclsSecurityPrincipal, then callsclsPrint.previewDocumentwith the current package, XML, and output profile.clsPrint.distributeDocumenteither invokes the xPression SOAP service directly or serializes aCompositeRequestClassmessage into MSMQ whenAsynchronousis enabled.clsRSPrint.PreviewDocumentloads the target SSRS report, applies any queued parameters, and renders the requested output format.
Architecture diagram¶
The following diagram shows the main components and their runtime dependencies.
flowchart TD
Consumer[Consumer or derived report class] --> IReport[IReport]
IReport --> ReportBase[ReportBase]
ReportBase --> XDoc[XDesignXDocument / XDesignXElement]
ReportBase --> ClsPrint[clsPrint]
Consumer --> ClsRSPrint[clsRSPrint]
ClsPrint --> Xpresso[xPression SOAP service]
ClsPrint --> MSMQ[MSMQ queue]
ClsRSPrint --> SSRS[SSRS ReportExecutionService]
ReportBase --> EnvSvc[EnvironmentServiceBase]
ClsPrint --> EnvSvc
ClsRSPrint --> EnvSvc
Sequence diagram¶
The following diagram shows the asynchronous xPression distribution path.
sequenceDiagram
participant Caller
participant Report as ReportBase
participant Print as clsPrint
participant MQ as MessageQueue
Caller->>Report: Distribute(overwrite)
Report->>Print: distributeDocument(package, xml)
alt Asynchronous = True
Print->>Print: Build CompositeRequestClass
Print->>MQ: Send transactional message
MQ-->>Print: Message accepted
else Asynchronous = False
Print->>Print: Call xPression distributeDocument
end
Print-->>Report: Success or exception
Report-->>Caller: Boolean result
Design constraints¶
- The library depends on
EnvironmentServiceBaseto providedocumentGeneratorServiceUrl,documentMSMQPath,idmFilePath, andsqlReportingServiceUrlbefore runtime operations can succeed. clsRSPrintsupports preview and render operations only;DistributeDocumentthrowsNotImplementedException.ReportBasesucceeds only when a consumer supplies report XML and a report package name before render or distribution operations.
Related documentation¶
Sources¶
Services\SAIF.Services.Printing\clsPrint.vbServices\SAIF.Services.Printing\clsRSPrint.vbServices\SAIF.Services.Printing\Reporting\IReport.vbServices\SAIF.Services.Printing\Reporting\ReportBase.vbServices\SAIF.Services.Printing\Reporting\ErrorDetail.vbServices\SAIF.Services.Printing\Reporting\XDesignXDocument.vbServices\SAIF.Services.Printing\Reporting\XDesignXElement.vb