|
|
Question : Login problem running Crystal reports on webserver
|
|
I get the following error trying to display the first page of a Crystal Report... Logon failed. Details: ADO Error Code: 0x Source: Microsoft SQL Native Client Description: Login timeout expired SQL State: HYT00 Logon failed. Details: ADO Error Code: 0x Source: Microsoft SQL Native Client Description: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. SQL State: 08001 Native Error: Logon failed. Details: ADO Error Code: 0x Source: Microsoft SQL Native Client Description: SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. SQL State: 08001 Native Error: Error in File C:\WINDOWS\TEMP\crEeTipRpt {CD759AD2-4746-46CC-8F9F-27EDC9884DBA}.rpt: Unable to connect: incorrect log on parameters.
I have already logged into the site at this point so I know the login parms in the web.config are correct atleast. The error occurs on the "CrystalReportViewer1.ShowFirstPage()" line in the code below
Private Sub RunReport() crRpt.Load(Server.MapPath(Request.QueryString("RptName"))) crRpt.FileName = Server.MapPath(Request.QueryString("RptName")) crRpt.SetDatabaseLogon(Common.dbUSER, _ Common.dbPWD, _ Common.dbSERVER, _ Common.dbDB, _ True)
Dim crParm As CrystalDecisions.Shared.ParameterField For Each crParm In crRpt.ParameterFields Select Case crParm.ParameterFieldName Case "@MemberId" crRpt.SetParameterValue("@MemberId", CInt(Request.QueryString("MemberId"))) Case "@EmployerId" crRpt.SetParameterValue("@EmployerId", CInt(Request.QueryString("EmployerId"))) Case "@StartDate" crRpt.SetParameterValue("@StartDate", CDate(Request.QueryString("StartDate"))) Case "@EndDate" crRpt.SetParameterValue("@EndDate", CDate(Request.QueryString("EndDate"))) End Select Next
CrystalReportViewer1.DisplayToolbar = CBool(Request.QueryString("DisplayToolbar")) CrystalReportViewer1.PrintMode() = CrystalDecisions.Web.PrintMode.ActiveX CrystalReportViewer1.ReportSource = crRpt CrystalReportViewer1.ShowFirstPage() End Sub
Any ideas?...Thanks in advance...this is urgent for me.
|
Answer : Login problem running Crystal reports on webserver
|
|
planocz: Looking back at your solution I see that it is essential the same as the one offered by mlmcc.
|
|
|
|
|