Skip to content

SAIF.Services.Printing operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Preview a document via xPression Render a document to PDF bytes for preview Caller invokes clsPrint.previewDocument/previewPDF Package, XML, OutputProfile, Application PDF byte array — — —
Print raw PDF bytes Send rendered PDF bytes to a physical printer Caller invokes clsPrint.printPDF PDF bytes, Printer, PlexMode, Copies, ScaleMode Boolean success flag — — —
Distribute a document Deliver a document synchronously (SOAP) or asynchronously (MSMQ) Caller invokes clsPrint.distributeDocument Package, XML, distribution properties, Asynchronous flag Boolean success flag — — —
MSMQ transaction lifecycle Batch multiple queued sends under one MSMQ transaction Caller invokes StartMQTransaction/EndMQTransaction — Committed/aborted transaction — — —
xDashBoard passthrough operations Forward xDashBoard requests directly to the xPression SOAP service Caller invokes xpublishDocument, xpreviewHTML, xpublishAndReturnDocument, xdocumentsForCategory, xoutputProfilesForDocument, xcategoriesForUser Varies by method Varies by method (bytes, string, string array) — — —
Render a letter or report Build and render a report/letter's XML into PDF bytes Caller (or Print/Distribute) invokes Reporting.ReportBase.Render overwrite flag Boolean success flag; populates m_reportFile — — —
Print a letter or report Render (if needed) and print a report/letter Caller invokes Reporting.ReportBase.Print printer, overwrite flag Boolean success flag — — —
Distribute a letter or report Build XML (if needed) and distribute a report/letter Caller invokes Reporting.ReportBase.Distribute overwrite flag Boolean success flag — — —
Save a rendered report to disk Persist rendered report bytes to a file on disk Caller invokes Reporting.ReportBase.Save DestinationFileName, overwrite flag Boolean (destination file exists) — — —
Switch output profile Select the default or draft-watermark output profile Caller invokes Reporting.ReportBase.SetDefaultProfile/SetDraftProfile — Updated OutputProfile value — — —
Render an SSRS report Load, parameterize, and render a report from an SSRS report definition Caller invokes clsRSPrint.PreviewDocument ReportPath, parameters, Format/Extension Rendered report bytes — — —
Add or clear SSRS report parameters Maintain the parameter set used on the next SSRS render Caller invokes clsRSPrint.AddParameter/ClearParameters Parameter name/value Updated internal parameter collection — — —
Distribute an SSRS report Declared distribution capability for SSRS reports Caller invokes clsRSPrint.DistributeDocument — Throws NotImplementedException — — —

Process flow diagram

The following diagram visualizes the primary operational flow for generating and delivering a document through the xPression facade.

flowchart TD
    Start([Caller requests document action]) --> BuildXml[Build/obtain XML via Reporting.ReportBase.Create]
    BuildXml --> Render[Render via clsPrint.previewDocument]
    Render --> Decision{Delivery mode?}
    Decision -->|Print| Print[clsPrint.printPDF]
    Decision -->|Distribute sync| DistSync[clsPrint.distributeDocument - SOAP]
    Decision -->|Distribute async| DistAsync[Queue CompositeRequestClass on MSMQ]
    Decision -->|Save| Save[Write bytes to DestinationFileName]
    Print --> EndOk([Delivered])
    DistSync --> EndOk
    DistAsync --> EndOk
    Save --> EndOk

Failure and edge-case behavior

  • clsRSPrint.DistributeDocument always throws NotImplementedException — SSRS report distribution is declared but not implemented.
  • clsPrint.printPDF returns True unconditionally; the result of the underlying SOAP call is not checked.
  • Reporting.ReportBase.Render/Print/Distribute/Save catch exceptions internally, record them as an ErrorDetail in the Errors list, and return False/skip rather than propagating the exception to the caller.
  • clsPrint.distributeDocument (async path) rolls back the MSMQ transaction on any exception and re-throws.

Sources

  • SAIF.Services.Printing\clsPrint.vb
  • SAIF.Services.Printing\clsRSPrint.vb
  • SAIF.Services.Printing\Reporting\ReportBase.vb