Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access two database in ReportDocument(crystal report)
Message
From
04/10/2011 04:59:21
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
How to access two database in ReportDocument(crystal report)
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01525517
Message ID:
01525517
Views:
60
Hi all,
I use vb.net (visual studio 2008). I want to print the join two database table data. One database i can handle.
But how to write two database access in ReportDocument ? Anyone know this can give some of information to me.
Thank you ~~~

The below is one database access.
Me.AccessrightTableAdapter1.Fill(Me.AAADataSet.accessright)

   Dim crReport As ReportDocument
  Dim repDB As Database = crReport.Database
        Dim repTbls As Tables = repDB.Tables
        Dim repTbl As Table

        repTbl = repTbls(0)
        Dim logonInfo As TableLogOnInfo = repTbl.LogOnInfo
        logonInfo.ConnectionInfo.ServerName = "AAA
        logonInfo.ConnectionInfo.DatabaseName = "A"
        logonInfo.ConnectionInfo.UserID = "aaa"
        logonInfo.ConnectionInfo.Password = "aaa"
        repTbl.ApplyLogOnInfo(logonInfo)

    crReport.SetDataSource(AAADataSet)

CrystalReportViewer1.ReportSource = crReport
Next
Reply
Map
View

Click here to load this message in the networking platform