Hi
I have a long process (method) say "ShowReport" which is taking much time for getting data from back-end and show it as a REPORT in CRYSTAL REPORT .what i want is to run this process as a new thread so it will fetch data and i want to show a blinking label which will say "Processing Data"
I have written this Code but no Report is popping up..can anybody tell what i am doing wrong?
Regards
Nouman
Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click
lblProgress.Visible = True
tmrProgress.Enabled = True
Dim t As Thread
t = New Thread(AddressOf Me.ShowReport)
t.Start()
lblProgress.Visible = False
tmrProgress.Enabled = False
End Sub
Private Sub ShowReport()
Dim objReport As New ReportObject
Dim myParam As New Collection
Dim strBuildSQL As String
strBuildSQL = BuildSQL()
myParam.Add(strBuildSQL)
objReport.ParamCollection = myParam
objReport.ShowReport("E")
End Sub
Private Sub tmrProgress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrProgress.Tick
If Me.lblProgress.ForeColor.ToArgb <> Me.lblProgress.BackColor.ToArgb Then
Me.tmrProgress.Interval = 250
Me.lblProgress.ForeColor = Me.lblProgress.BackColor
Else
Me.tmrProgress.Interval = 1000
Me.lblProgress.ForeColor = Color.Black
End If
End Sub
Nouman Zaheer
Software Engineer
MSR
I have a long process (method) say "ShowReport" which is taking much time for getting data from back-end and show it as a REPORT in CRYSTAL REPORT .what i want is to run this process as a new thread so it will fetch data and i want to show a blinking label which will say "Processing Data"
I have written this Code but no Report is popping up..can anybody tell what i am doing wrong?
Regards
Nouman
Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click
lblProgress.Visible = True
tmrProgress.Enabled = True
Dim t As Thread
t = New Thread(AddressOf Me.ShowReport)
t.Start()
lblProgress.Visible = False
tmrProgress.Enabled = False
End Sub
Private Sub ShowReport()
Dim objReport As New ReportObject
Dim myParam As New Collection
Dim strBuildSQL As String
strBuildSQL = BuildSQL()
myParam.Add(strBuildSQL)
objReport.ParamCollection = myParam
objReport.ShowReport("E")
End Sub
Private Sub tmrProgress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrProgress.Tick
If Me.lblProgress.ForeColor.ToArgb <> Me.lblProgress.BackColor.ToArgb Then
Me.tmrProgress.Interval = 250
Me.lblProgress.ForeColor = Me.lblProgress.BackColor
Else
Me.tmrProgress.Interval = 1000
Me.lblProgress.ForeColor = Color.Black
End If
End Sub
Nouman Zaheer
Software Engineer
MSR