Home » Visual StudioRSS

connect crystal report viewer to sql 2008

Using visual studio 2008, I have connected crystal reports to sql 2000 using the code behind below.  I have upgraded to sql 2008 and now when the page runs it keeps asking for a password, even after I put in the odbc password.  I have updated my odbc.  The report runs fine from within visual studio.  Appreciate any help.

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared


PartialClass FivePlusSuspensions

    Inherits System.Web.UI.Page



    PrivateSub ConfigureCrystalReports()

        Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()

        myConnectionInfo.ServerName = "odbc Name"

        myConnectionInfo.DatabaseName = ""

        myConnectionInfo.UserID = "odbc id"

        myConnectionInfo.Password = "odbc password"



    PrivateSub setDblogonforReport(ByVal myconnectioninfo As ConnectionInfo)

        Dim mytableloginfos AsNew TableLogOnInfos()

        mytableloginfos = CrystalReportViewer1.LogOnInfo

        ForEach mytablelogoninfo As TableLogOnInfo In mytableloginfos

            mytablelogoninfo.ConnectionInfo = myconnectioninfo



    ProtectedSub Page_Init(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Init







1 Answer Found


Answer 1

The only suggestion I can make is to try pulling the data into a dataset first and then hand the dataset to the report. Does that work with the new server?




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter