Skip to content

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

  1. Print checks whether rendered bytes are missing or overwrite is True.
  2. If so: it calls Render(overwrite) — see Render report — which reuses cached bytes unless a refresh is needed (BR-004).
  3. Print checks whether rendered bytes (m_reportFile) are now present.
  4. If bytes are present: it assigns the caller-supplied printer to xPrint.Printer, then calls xPrint.printPDF(m_reportFile) — see Print rendered PDF — and sets result = True.
  5. If bytes are still absent (render failed or was skipped without producing bytes): Print returns False without attempting to print.
  6. Print returns the accumulated result.

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

  • Print does not surface the specific reason rendering failed; if Render added an ErrorDetail to Errors, Print still simply returns False from the byte-presence check without re-raising or re-describing that error.*
  • Print does not catch exceptions from xPrint.printPDF itself; a SOAP fault from the underlying print call propagates directly to the caller.*

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.vb
  • Services\SAIF.Services.Printing\clsPrint.vb