It happens to all the reports that I have. I do have access to the database as I can preview the report from within the development environment. I am posting the code to see if that helps solve the issue.
vb Code:
Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class Form1 Private Sub ConfigureCrystalReports() Dim reportPath As String = "F:\ProCoS\crystals\scrapreport.rpt" MyCrystalReportsViewer.ReportSource = reportPath Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo() myConnectionInfo.DatabaseName = "CentralOps" myConnectionInfo.UserID = "sql" myConnectionInfo.Password = "hmpsql" SetDBLogonForReport(myConnectionInfo) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ConfigureCrystalReports() End Sub Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo) Dim myTableLogOnInfos As TableLogOnInfos = MyCrystalReportsViewer.LogOnInfo For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos myTableLogOnInfo.ConnectionInfo = myConnectionInfo Next End Sub End Class




Reply With Quote