Hi all,
I had a little problem when deploying an application having crystal reports as a reporting tool on a client pc.
It works so well in my dev pc even installed.Since i'm using Access 2007 i used Microsoft.ACE.OLEDB.12.0 provider.
I haven't provided any password or username for the database.But it keeps asking to provide a user name and a password.
I'm using the recent version of crystal reports (SP9) for VS and the runtime for client pc.
Here is the code i used to view the report using the pull method.Any comment or modification on my coding or db connection is greatly appreciated.

Dim rep As New ReportDocument

        With rep
            .Load(ReportPath)
            .SetDataSource(ds)
        End With
        CrystalReportViewer1.ReportSource = rep
        CrystalReportViewer1.Show()

I used this code and it's still not fixed.Any thoughts guys?

 Public Sub ShowPayment(ByVal ReportPath As String, ByVal ds As DataTable)
        Dim rep As New ReportDocument
        Dim myTableLogonInfo As New TableLogOnInfo
        Dim myConnectionInfo As New ConnectionInfo
        'Dim myTables As Tables
        Dim myTable As Table
        rep.Load(ReportPath)
        rep.SetDataSource(ds)

        ' myTables = rep.Database.Tables
        With myConnectionInfo
            .ServerName = "C:\Users\Abdueie\Desktop\Project Payroll\Project Payroll\bin\Debug\projectpayrolls.accdb"
            .DatabaseName = "C:\Users\Abdueie\Desktop\Project Payroll\Project Payroll\bin\Debug\projectpayrolls.accdb"
            .UserID = "Admin"
            .Password = "12345"
        End With
        For Each myTable In rep.Database.Tables
            myTableLogonInfo = myTable.LogOnInfo
            ' myConnectionInfo = myTableLogonInfo.ConnectionInfo

            myTableLogonInfo.ConnectionInfo = myConnectionInfo
            myTable.ApplyLogOnInfo(myTableLogonInfo)
        Next
        CrystalReportViewer1.ReportSource = rep
        CrystalReportViewer1.RefreshReport()
        'CrystalReportViewer1.Show()

    End Sub

I've solved the problem.I just provided the server name only and left the rest
empty.Thanks anyway.

This question has already been answered. Start a new discussion instead.