Originariamente inviato da sosan1
allora...
1) il report si basa su dati letti da un db? allora il report deve avere una connessione al db selezioni la connessione e le tabelle che ti occorrono
2) da vb devi invece creare un oggetto che rappresenta il tuo report
come ti ho spiegato su e poi devi settare le credenziali e passarle al tuo report
esempio
Dim credenziali As New TableLogOnInfo
Dim report As New ReportDocument
Dim connessione As String = Application("Connessione")
credenziali.ConnectionInfo.UserID = miauserid credenziali.ConnectionInfo.Password = miapassword credenziali.ConnectionInfo.ServerName = mioDataSource
CrystalStatistiche.LogOnInfo.Add(credenziali)
poi le passi al report
For intTablesCount As Integer = 0 To report.Database.Tables().Count() - 1
report.Database.Tables(intTablesCount).ApplyLogOnI nfo(credenziali)
For intSubReportCount As Integer = 0 To report.Subreports().Count() - 1
For tabella As Integer = 0 To report.Subreports.Item(intSubReportCount).Database ().Tables.Count - 1 report.Subreports().Item(intSubReportCount).Databa se().Tables(tabella).ApplyLogOnInfo(credenziali)
Next
Next intSubReportCount
Next intTablesCount