📚 SAP Business One SDK Help

PrintEvent Event
See Also  Example
eventInfo
The object that holds the event information
BubbleEvent

Indicates how the application handles the event. Relevant only when PrintEventInfo.BeforeAction is true.

  • True: The application sends the document to its default printer port.
  • False: The application does not send the document to its default printer port.
  • Description

    Occurs when one of the following takes place:

    • End user clicks on Print or Print Preview icons.
    • End user sends documents to print using the Document Printing option.
    • A document is sent to print by the Document Generation Wizard.

    Syntax

    Visual Basic
    Public Event PrintEvent( _
       ByVal eventInfo As PrintEventInfo, _
       ByRef BubbleEvent As Boolean _
    )

    Parameters

    eventInfo
    The object that holds the event information
    BubbleEvent

    Indicates how the application handles the event. Relevant only when PrintEventInfo.BeforeAction is true.

  • True: The application sends the document to its default printer port.
  • False: The application does not send the document to its default printer port.
  • Example

    Catching print events (Visual Basic)Copy Code
    Private WithEvents SBO_Application As SAPbouiCOM.Application

    Private Sub SBO_Application_PrintEvent(ByRef printEventInfo As SAPbouiCOM.printEventInfo, ByRef BubbleEvent As Boolean)
        Handles SBO_Application.PrintEvent
        Dim bDraft As Boolean = printEventInfo.DraftDoc
        Dim reportStr As String = printEventInfo.ReportCode
        Dim reportTempl As String = printEventInfo.ReportTemplate
        Dim bWithPref As Boolean = printEventInfo.WithPrinterPreferences
        Dim numOfCopies As Long = printEventInfo.NumberOfCopies
    End Sub

    See Also