Print report¶
ReportBase.Print is the consumer-facing print entry point on the IReport workflow. It guarantees rendered bytes are available (rendering on demand) before assigning the requested printer and forwarding the bytes to clsPrint.printPDF.
| Field | Value |
|---|---|
| Operation ID | OP-PRT-05 |
| Trigger | Caller invokes ReportBase.Print(printer, overwrite) |
| Inputs | Target printer name; optional overwrite flag |
| Outputs | Boolean success |
| Primary components | Reporting.ReportBase.Print, Reporting.ReportBase.Render, clsPrint.printPDF |
| Entry point | Services\SAIF.Services.Printing\Reporting\ReportBase.vb |
Steps¶
Printchecks whether rendered bytes are missing oroverwriteisTrue.- If so: it calls
Render(overwrite)— see Render report — which reuses cached bytes unless a refresh is needed (BR-004). Printchecks whether rendered bytes (m_reportFile) are now present.- If bytes are present: it assigns the caller-supplied
printertoxPrint.Printer, then callsxPrint.printPDF(m_reportFile)— see Print rendered PDF — and setsresult = True. - If bytes are still absent (render failed or was skipped without producing bytes):
PrintreturnsFalsewithout attempting to print. Printreturns the accumulatedresult.
Process flow¶
The following diagram visualizes the render-then-print sequence.
flowchart TD
Start([Print called with printer, overwrite]) --> NeedRender{Bytes missing<br>or overwrite = True?}
NeedRender -->|Yes| Render[Call Render overwrite]
NeedRender -->|No| Check
Render --> Check{Rendered bytes present?}
Check -->|No| Fail([Return False])
Check -->|Yes| SetPrinter[Assign printer to xPrint.Printer]
SetPrinter --> Send[Call xPrint.printPDF]
Send --> End([Return True])
Failure and edge-case behavior¶
Printdoes not surface the specific reason rendering failed; ifRenderadded anErrorDetailtoErrors,Printstill simply returnsFalsefrom the byte-presence check without re-raising or re-describing that error.*Printdoes not catch exceptions fromxPrint.printPDFitself; a SOAP fault from the underlying print call propagates directly to the caller.*
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\Reporting\ReportBase.vbServices\SAIF.Services.Printing\clsPrint.vb