Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access two database in ReportDocument(crystal report)
Message
De
04/10/2011 04:59:21
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
How to access two database in ReportDocument(crystal report)
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01525517
Message ID:
01525517
Vues:
58
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform