Skip to Content
0
Former Member
Dec 20, 2007 at 03:19 PM

Problem with v8 in VS2005

25 Views

Post Author: JoeBryant

CA Forum: .NET

I ran a VB6 application that used v8 of Crystal Reports through the VS2005 conversion wizard. The app converted fine to VS2005 (VB.NET) but I'm having trouble with the reports. I placed a CrystalReportViewer (CR1) on my web form and tried to display one of the v8 reports in it using the following code, but it just displays a logon form with everying except the password data filled in. Filling in the pw and clicking the Log On button does not produce any results.

Is there a conversion tool that I can use to upgrade my v8 reports to the VS2005 version? Any/all help is appreciated.

Dim report As New ReportDocument()

report.Load("
myServer\TOCManager\Reports\UNOR.rpt")

Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()

Dim table As Table

' Set the logon information for each table.

For Each table In report.Database.Tables

' Get the TableLogOnInfo object.

logonInfo = table.LogOnInfo

' Set the server or ODBC data source name, database name, user ID, and password.

With logonInfo.ConnectionInfo

.ServerName = "SQLSERVER01"

.DatabaseName = "myDB"

.UserID = "User_ID"

.Password = "User_PW"

End With

' Apply the connection information to the table.

table.ApplyLogOnInfo(logonInfo)

Next table

CR1.ReportSource = report