Muhammad Kashif
New member
- Joined
- Jul 11, 2008
- Messages
- 1
- Programming Experience
- 3-5
I created a project in VB .Net and used Crystal Reports for Visual Studio 2005 for reporting purpose.
I made setup of the project. When I run setup on my system reports run smoothly but when i run it on another computer reports displays Databes Login Dialog Box and requires username and password; I attached the Dialog Box which appears.
I used stored procedure for my reports
and used login information and passed parameters as follows.
Even then i receive Database Login Dialog Box.
Thanx in advance To reply this.
I made setup of the project. When I run setup on my system reports run smoothly but when i run it on another computer reports displays Databes Login Dialog Box and requires username and password; I attached the Dialog Box which appears.
I used stored procedure for my reports
and used login information and passed parameters as follows.
VB.NET:
Dim _Report As New rptReport_Documnet1
Try
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
Dim crTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim ConnInfo As New CrystalDecisions.Shared.ConnectionInfo()
ConnInfo.ServerName = "pms-mahmad\sql2005"
ConnInfo.DatabaseName = "QHSE"
ConnInfo.UserID = "sa"
ConnInfo.Password = "sa2008"
For Each crTable In _Report.Database.Tables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = ConnInfo
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
Dim PFsPolicyNo As ParameterFields = CType(_Report, ReportDocument).ParameterFields
Dim paramDiscreteValue As New ParameterDiscreteValue
paramDiscreteValue.Value = paramValue
paramField.CurrentValues.Add(paramDiscreteValue)
crViewer.ReportSource = _Report
Catch ex As Exception
Throw ex
End Try
Even then i receive Database Login Dialog Box.
Thanx in advance To reply this.