Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8695

Re: Report Alerts Not Firing From VB6

$
0
0

That worked. Thanks.

By the way, I had to change the code in the following way to trap the alert embeded in one of the subreports:

 

Private Sub CheckAlertsIn(rept As CRAXDDRT.report)

    Dim reptSection As CRAXDDRT.Section

 

    WaitForFinishLoading

    For Each reptSection In rept.Sections

        CheckAlertsInSection reptSection

    Next

End Sub

 

 

Private Sub WaitForFinishLoading()

    Do While Me.ReportViewer.IsBusy

        DoEvents

        Sleep 100

    Loop

End Sub

 

 

Private Sub CheckAlertsInSection(sect As CRAXDDRT.Section)

    Dim reptObject As Object

 

    For Each reptObject In sect.ReportObjects

        CheckIfIsSubreport reptObject

    Next

End Sub

 

 

Private Sub CheckIfIsSubreport(reptObject As Object)

    If reptObject.Kind = CRAXDDRT.crSubreportObject Then

        CheckIfHasAlerts reptObject.OpenSubreport

    End If

End Sub

 

 

Private Sub CheckIfHasAlerts(subreport As CRAXDDRT.report)

    Dim alert As CRAXDDRT.ReportAlert

 

    For Each alert In subreport.ReportAlerts

        CheckAlert alert

    Next

End Sub

 

 

Private Sub CheckAlert(alert As CRAXDDRT.ReportAlert)

    Dim alertInstance As CRAXDDRT.ReportAlertInstance

 

    For Each alertInstance In alert.AlertInstances

        MsgBox alertInstance.AlertMessage, vbInformation, "Report Alert"

    Next

End Sub


Viewing all articles
Browse latest Browse all 8695

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>