locked
Error Message when trying to open crystal report RRS feed

  • Question

  • User-235135888 posted

    Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

    I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

    Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

            Dim Count As Int32
            Count = Int32.Parse(Label1.Text)

            Dim ConnInfo As New ConnectionInfo
            With ConnInfo
                .ServerName = "\\Server1\Sqlexpress"
                .DatabaseName = "DATA"
                .UserID = "sa"
                .Password = "118118"
            End With

            Me.CrystalReportViewer1.ParameterFieldInfo.Clear()

            Dim ParamFields As ParameterFields =  Me.CrystalReportViewer1.ParameterFieldInfo

            Dim p_EmpID As New ParameterField

            p_EmpID.Name = "Pam"

            Dim p_EmpID_Value As New ParameterDiscreteValue

            p_EmpID_Value.Value = Count

            p_EmpID.CurrentValues.Add(p_EmpID_Value)

            ParamFields.Add(p_EmpID)

          End Sub

     

     


     

     

    Thursday, August 19, 2010 12:24 PM

All replies

  • User1224194097 posted

    Unable to connect: incorrect log on parameters.

    Are you sure that correct logon parameters are being passed on to the report?

    Thursday, August 19, 2010 1:13 PM
  • User-235135888 posted

    Well when I run the report from the localhost it picks up the parameters and loads the requested report ok.  So I am fairly sure the parameters are working.   I cant seem to get any of my reports working from IIS so it amy be something I am doing wrong.

    Friday, August 20, 2010 3:32 AM
  • User-235135888 posted

     Anyone Help me still stuck with this ??

    Tuesday, September 21, 2010 9:54 AM