i have a crystal report then i create new connection under Access/Excel, then i select my database.
i add 2 access database say Database1.tbl_employee and Database2.tbl_images.
now i linked the 2 tables from 2 database.
tbl_employee.ID ---- tbl_images.ID

it works well on crystal report the problem is when i call the report from vb its asking for a connection info,
currently i have this code.

but i only declare 1 database connection info on this code.
is there a way to have them both ,, i mean connection info for 2 database.
any help would do.

 Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
        Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

            Dim cryRpt As New ReportDocument
            cryRpt.Load(Application.StartupPath & "\Reports\cr_client_form.rpt")

For Each tbCurrent In cryRpt.Database.Tables
                tliCurrent = tbCurrent.LogOnInfo
                With tliCurrent.ConnectionInfo
                    .ServerName = Application.StartupPath & "\DataImg.mdb"
                    .UserID = ""
                    .Password = "ian"
                    .DatabaseName = Application.StartupPath & "\DataImg.mdb"
                End With
                tbCurrent.ApplyLogOnInfo(tliCurrent)
            Next tbCurrent


            CrystalReportViewer1.ReportSource = cryRpt
            CrystalReportViewer1.Refresh()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.