Naithan Arroyo
asked on
Why Does Crystal reports, running in different thread, log in fail?
This code works when called on main thread.
Printlist ()
but fails when
ThreadPool.QueueUserWorkIt em(Address Of Printlist)
with a login error
this issue does not occur on my pc. (windows vista)
Ive tested and got the same error on 3 pc's
windows 2003
windows xp
windows vista
Printlist ()
but fails when
ThreadPool.QueueUserWorkIt
with a login error
this issue does not occur on my pc. (windows vista)
Ive tested and got the same error on 3 pc's
windows 2003
windows xp
windows vista
Public Sub Printlist()
Try
Dim crpt As New Lister
Dim STRPath As String = AppDomain.CurrentDomain.BaseDirectory & "\cuurent.pdf"
crpt.Refresh()
crpt.SetDatabaseLogon("xx", "xxxxxxx")
crpt.ExportToDisk(ExportFormatType.PortableDocFormat, STRPath)
Dim MyProcess As New Process
MyProcess.StartInfo.CreateNoWindow = False
MyProcess.StartInfo.FileName = STRPath
MyProcess.Start()
Catch ex As Exception
MessageBox.Show(ex.ToString)
TextBox66.Text = ex.ToString
End Try
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you VeryMuch