hii
I have found a problem of the connection. Actually i have called a crystal report in my code and it works fine on my PC whose operating syatem is window7 and when i run the same exe in xp version then it gives me an connection pop up window in which database field is blank and when i click on ok then it gives me an error logon failed.
my code is as follows :
Dim cryRpt As New ReportDocument
cryRpt.Load(MainModule.bundlepath)
Dim crtableLogoninfos As New TableLogOnInfos()
Dim crtableLogoninfo As New TableLogOnInfo()
Dim crConnectionInfo As New ConnectionInfo()
Dim CrTables As Tables
Dim myParameterFields As New ParameterFields
Dim myParameterField As New ParameterField
Dim myDiscreteValue1 As New ParameterDiscreteValue
myParameterField.ParameterFieldName =
"style"
myDiscreteValue1.Value = MainModule.bundlestyle
myParameterField.CurrentValues.Add(myDiscreteValue1)
myParameterFields.Add(myParameterField)
CrystalReportViewer1.ParameterFieldInfo = myParameterFields
crConnectionInfo.ServerName =
"192.168.100.52"
crConnectionInfo.DatabaseName =
"vg2012may06"
crConnectionInfo.UserID =
"sa"
crConnectionInfo.Password =
"ocltest"
CrTables = cryRpt.Database.Tables
For Each CrTable As CrystalDecisions.CrystalReports.Engine.Table In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.Visible =
True
so please help in recoverin the following problem