If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Migrate VS2005 to 2008 Breaks Crystal Reports?

This code worked on the dev pc with vs2005. Since migrating to vs2008 it no longer works. Now a dialog screen appears requesting login information when the Viewer is run. Here is the code snippet.... Can anyone advise why login no longer works?
..................................................
'' Create a new instance of the tablelogoninfos class which contains
''the tablelogoninfo objects for each table in the report
Dim crTableLogonInfos = New CrystalDecisions.Shared.TableLogOnInfos()

''Create a new instance of the TableLogonInfo class which contains
''the connection information for each table
Dim crTableLogonInfo = New CrystalDecisions.Shared.TableLogOnInfo()

''apply the connection information to each table. If the TableName is not specified, the
''logon to the database will fail. Once the tablename and connection information have been
''set for each table object, it is added to the TableLogonInfos collection using the Add method.
Dim crTables As CrystalDecisions.CrystalReports.Engine.Tables
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
crTables = myReport.Database.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTableLogonInfos.Add(crTableLogonInfo)
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
'' sub report
Dim mySubReport As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
mySubReport = myReport.Subreports(0)
crTables = mySubReport.Database.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTableLogonInfos.Add(crTableLogonInfo)
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next

''setup the viewer
With rptViewer
''Pass the table information to the logoninfo property of the viewer
.LogOnInfo = crTableLogonInfos
''The viewer's reportsource must be set to a report before any
''parameter fields can be accessed.
.ReportSource = myReport
.show()
End With

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.