Skip to content

Output profile selection

Sets the OutputProfile field to a fixed constant selecting either the final (PDF) or draft/watermarked (PDF_Draft_Watermark) xPression output profile. This operation performs no rendering itself; the selected value is consumed later by the render lifecycle.

Field Value
Operation ID OP-10
Trigger SetDefaultProfile / SetDraftProfile invoked
Inputs None
Outputs OutputProfile set to a fixed constant
Primary components ReportBase.SetDefaultProfile, ReportBase.SetDraftProfile
Entry point Public Sub SetDefaultProfile() / Public Sub SetDraftProfile()

Steps

  1. SetDefaultProfile() sets OutputProfile = PROFILE_DEFAULT (the constant "PDF") — draft output uses the PDF_Draft_Watermark profile and final output uses the PDF profile (BR-PRT-015).
  2. SetDraftProfile() sets OutputProfile = PROFILE_DRAFT (the constant "PDF_Draft_Watermark") (BR-PRT-015).
  3. The selected OutputProfile value is consumed later by Render when it calls xPrint.previewDocument(m_ReportPackage, m_reportXml.ToXpression, OutputProfile); this operation only sets the field and performs no rendering itself.

Origin: OutputProfile is consumed by Report render lifecycle, which passes it to xPrint.previewDocument.

Process flow

flowchart TD
    Start1(["SetDefaultProfile called"]) --> Set1["Set OutputProfile = 'PDF'"]
    Set1 --> End1(["End"])

    Start2(["SetDraftProfile called"]) --> Set2["Set OutputProfile =<br>'PDF_Draft_Watermark'"]
    Set2 --> End2(["End"])

Failure and edge-case behavior

  • Neither method can fail: there is no I/O and no validation, only a pure field assignment.
  • Calling order matters only in that whichever method is called last before Render wins; there is no guard against calling both or neither. The field's own default at construction is "PDF", the same value as PROFILE_DEFAULT.

Sources

  • SAIF.Services.Printing/Reporting/ReportBase.vb
  • SAIF.Services.Printing/Reporting/IReport.vb