Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

VB.NET 2012, Access 2007, Logon error

$
0
0

I am trying to integrate a Crystal 2011 report into VB.NET 2012 with the new Visual Studio add on to VB.NET 2012.  All the code worked until I moved from Access 2000 to Access 2007.  The report opens with " Logon Failed Please try again" I click on the OK and press the refresh button in the report.  The report runs.  How do I get rid of the logon error.

Thanks for any help.

 

here is my code:

  

Dim Report AsNewReportDocument

Dim Connection AsIConnectionInfo

Dim crconnectioninfo AsNewConnectionInfo

Dim ReportName AsString

Dim OldserverName AsString = ""

Dim OldDatabaseName AsString = ""

Dim NewDatabaseName AsString = Application.StartupPath + "\ddkwo.accdb"

Dim Myid AsString = "Admin"

Dim Mypw AsString = ""


        ReportName = Application.StartupPath + "\r1.rpt"

        Report.Load(ReportName)

       

ForEach Connection In Report.DataSourceConnections

            OldserverName = Connection.ServerName

            OldDatabaseName = Connection.DatabaseName

            Report.SetDatabaseLogon(Myid, Mypw)

            Report.DataSourceConnections(OldserverName, OldDatabaseName).SetConnection(OldserverName, NewDatabaseName,

True)

Next


CrystalReportViewer1.ReportSource = Report

CrystalReportViewer1.Refresh()



Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>