📚 SAP Business One SDK Help

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

Indicates how the application handles the event. Relevant only when ReportDataInfo.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 a report is sent to the printer.

    Syntax

    Visual Basic
    Public Event ReportDataEvent( _
       ByVal eventInfo As ReportDataInfo, _
       ByRef BubbleEvent As Boolean _
    )

    Parameters

    eventInfo
    The object that holds the event information
    BubbleEvent

    Indicates how the application handles the event. Relevant only when ReportDataInfo.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 report data events (Visual Basic)Copy Code
    Private WithEvents SBO_Application As SAPbouiCOM.Application
    Private Sub SBO_Application_ReportDataEvent( ByRef reportDataInfo As SAPbouiCOM.reportDataInfo, ByRef BubbleEvent As Boolean) Handles
        SBO_Application.ReportDataEvent
            If (reportDataInfo.BeforeAction = True) Then
            ' Before Event
                reportDataInfo.RegisterForReport (True)
            Else
            ' After event
            Dim reportCode As String = reportDataInfo.ReportCode
            Dim reportTemplate As String = reportDataInfo.ReportTemplate
            Dim count As Long = reportDataInfo.GetPageCount()
            Dim size As Long = reportDataInfo.GetReportSize()
            Dim xmlDataWithProp As String
            xmlDataWithProp = reportDataInfo.GetReportData(1, 1, True)
            xmlDataWithProp = reportDataInfo.GetReportData()
    End Sub

    See Also