Crystal Report Login Error (VB .Net)

  • 12 years ago

    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.

    Dim _Report As New rptReport_Documnet1

                        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

                        Dim PFsPolicyNo As ParameterFields = CType(_Report, ReportDocument).ParameterFields
                        Dim paramDiscreteValue As New ParameterDiscreteValue
                        paramDiscreteValue.Value = paramValue

                        crViewer.ReportSource = _Report
    Catch ex As Exception
            Throw ex
    End Try
    Even then i receive Database Login Dialog Box.

    Thanx in advance to consider it seriously.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The difference between theory and practice is smaller in theory than in practice.”