Report print¶
Ensures a report has been rendered — reusing a cached render or forcing a fresh one — and then sends the resulting bytes to a caller-supplied printer.
| Field | Value |
|---|---|
| Operation ID | OP-07 |
| Trigger | Print invoked |
| Inputs | printer As String, overwrite As Boolean = False, cached or freshly rendered ReportFile |
| Outputs | True/False |
| Primary components | ReportBase.Print, Render, clsPrint.printPDF |
| Entry point | Public Function Print(printer As String, Optional overwrite As Boolean = False) As Boolean |
Steps¶
- If
m_reportFile Is Nothingoroverwriteis requested, callsRender(overwrite)first to ensure a rendered file exists (or is refreshed).
Origin: This step is the full Report render lifecycle operation, including its render-result caching (BR-PRT-007) and non-throwing failure handling (BR-PRT-010), invoked inline. 2. Checks whether
m_reportFileis notNothing— i.e., whether rendering (new or cached) actually produced bytes. - IfFalse: printing is skipped andresultremainsFalse. - Note:Render's own return value is not checked here — only the resultingm_reportFilestate is. ARendercall that returnedFalsedue to a caught exception but left a stalem_reportFilepopulated (e.g., from a prior successful render before a later overwrite failure) would still be treated as printable.* 3. Ifm_reportFileis notNothing: setsxPrint.Printer = printer(the caller-supplied printer, distinct fromRender's own default-printer resolution — BR-PRT-009) and callsxPrint.printPDF(m_reportFile).Origin: The
printPDFcall is the same operation documented as Print rendered bytes, which always reports unconditional success (BR-PRT-013). 4. ReturnsTrueif step 3 ran,Falseotherwise.
Process flow¶
flowchart TD
Start([Print called]) --> Need{"reportFile Nothing<br>OR overwrite?"}
Need -->|Yes| Render["Render()<br>(→OP-06)"]
Need -->|No| Skip["skip render"]
Render --> Have{"reportFile<br>now set?"}
Skip --> Have
Have -->|No| Fail(["Return False"])
Have -->|Yes| SetPrinter["Set Printer"]
SetPrinter --> PrintPDF["printPDF<br>(→OP-03, BR-PRT-013)"]
PrintPDF --> Ok(["Return True"])
Failure and edge-case behavior¶
- Unlike
RenderandDistribute,Printhas no try/catch of its own: any exception fromprintPDF(itself normally suppressed toTrueper BR-PRT-013, but whose underlying SOAP call can still throw) propagates directly out ofPrint— a contrast with OP-06's and OP-08's non-throwing contract. - No
ErrorDetailis ever added byPrintitself, even on theresult = Falsepath from step 2.
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Configuration
- API reference
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¶
SAIF.Services.Printing/Reporting/ReportBase.vbSAIF.Services.Printing/Reporting/IReport.vb