Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Unable to connect: incorrect log on parameters. Post Reply Post New Topic
Page  of 2 Next >>
Author Message
vkcrystal
Newbie
Newbie


Joined: 29 Jan 2008
Online Status: Offline
Posts: 9
Quote vkcrystal Replybullet Topic: Unable to connect: incorrect log on parameters.
    Posted: 29 Jan 2008 at 4:34pm
Hi guys,

I am using VS.NET2005 and Crystal 10. Reports work fine on my local machine but when i try to deploy to another server i get this message.
Any idea? Appreciate your help
Thanks
 

Logon failed.
Details: Error Code: 0x
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.Error in File C:\WINDOWS\TEMP\Medea {75AF52CB-2B30-454F-9B58-539E0C3294B6}.rpt:
Unable to connect: incorrect log on parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Logon failed.
Details: Error Code: 0x
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.Error in File C:\WINDOWS\TEMP\Medea {75AF52CB-2B30-454F-9B58-539E0C3294B6}.rpt:
Unable to connect: incorrect log on parameters.

Source Error:


Line 58: CrTable.ApplyLogOnInfo(crtableLogoninfo)
Line 59:
Line 60: CrTable.Location = crConnectionInfo.DatabaseName & ".dbo." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)
Line 61: Next
Line 62:


Source File: d:\inetpub\wwwroot\onboarding\pages\PrintReport.aspx.vb Line: 60

Stack Trace:


[COMException (0x8004100f): Logon failed.
Details: Error Code: 0x
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.
Error in File C:\WINDOWS\TEMP\Medea {75AF52CB-2B30-454F-9B58-539E0C3294B6}.rpt:
Unable to connect: incorrect log on parameters.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable) +0
CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value) +502
Pages_PrintReport.refreshCrystalReport() in d:\inetpub\wwwroot\onboarding\pages\PrintReport.aspx.vb:60
Pages_PrintReport.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\onboarding\pages\PrintReport.aspx.vb:18
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 7:13pm
For CR 2005, they have a new method to simply logging it. It's SetDatabaseLogin(id, pw) and it's part of the ReportDocument class. Give it a try and see how it works.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
vkcrystal
Newbie
Newbie


Joined: 29 Jan 2008
Online Status: Offline
Posts: 9
Quote vkcrystal Replybullet Posted: 29 Jan 2008 at 7:35pm

Hi Brian,

Please see my code below. It was working fine on my local machine but doesn't work   on windows2003 server.

 Dim dbFunctions As New DatabaseUtilities

        Dim oRpt As ReportDocument

        oRpt = New ReportDocument

        Dim reportPath As String = Server.MapPath("Medea.rpt")

        oRpt.Load(reportPath)

 

        Dim ServerName As String = "MSDB08Q"

        Dim DatabaseName As String = "ONBOARD"

        Dim userIDName As String = "sa1"

        Dim pwdName As String = "pass234"

 

 

        Dim crConnectionInfo As New ConnectionInfo

        Dim CrTables As Tables

        Dim CrTable As Table

        Dim crtableLogoninfos As New TableLogOnInfo

        Dim crtableLogoninfo As New TableLogOnInfo

 

        Dim crParameterFieldDefinitions As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions

        Dim crParameterFieldDefinition As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition

        Dim crParameterValues As New ParameterValues

        Dim crParameterDiscreteValue As New ParameterDiscreteValue

 

        With crConnectionInfo

            .ServerName = ServerName

            .DatabaseName = DatabaseName

            .UserID = userIDName

            .Password = pwdName

 

        End With

 

        CrTables = oRpt.Database.Tables

 

        For Each CrTable In CrTables

            crtableLogoninfo = CrTable.LogOnInfo

            crtableLogoninfo.ConnectionInfo = crConnectionInfo

            CrTable.ApplyLogOnInfo(crtableLogoninfo)

 

               CrTable.Location = crConnectionInfo.DatabaseName & ".dbo." & CrTable.Location.Substring(CrTable.Location.LastIndexOf(".") + 1)

        Next

 

 

        crParameterDiscreteValue.Value = Request.QueryString("id")

        crParameterFieldDefinitions = oRpt.DataDefinition.ParameterFields

        crParameterFieldDefinition = crParameterFieldDefinitions.Item("OBID")

        crParameterValues = crParameterFieldDefinition.CurrentValues

        crParameterValues.Add(crParameterDiscreteValue)

        crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)

 

        oRpt.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.Landscape

        Dim oStream As New MemoryStream 'using System.IO

 

        If Request.QueryString("t") = "pdf" Then

            oStream = oRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

            Response.Clear()

            Response.Buffer = True

            Response.ContentType = "application/pdf" 'vnd.ms-word

            Response.BinaryWrite(oStream.ToArray())

            Response.End()

        Else

            oStream = oRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel)

            Response.Clear()

            Response.Buffer = True

            Response.ContentType = "application/vnd.ms-excel"

            Response.BinaryWrite(oStream.ToArray())

            Response.End()

        End If

 

       

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 8:11pm
Well, all your code looks clean (as it should since it does work on your local box). I would try removing the part where you set the .Location property. This isn't necessary in CR 2005 anymore and I wonder if maybe since you're assigning the table owner and all that with concatenation, maybe something is going wrong there. Just get rid of that line b/c it's not necessary anyway and see if that helps out at all.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
vkcrystal
Newbie
Newbie


Joined: 29 Jan 2008
Online Status: Offline
Posts: 9
Quote vkcrystal Replybullet Posted: 29 Jan 2008 at 9:02pm
Brian,
Thanks for your help, i get rid of that .location and  i am getting the error at exporting to PDF file.  Please see below.
 
 
 
Description: Provider cannot be found. It may not be properly installed.Error in File C:\WINDOWS\TEMP\Medea {E48953AA-F243-4F31-92B1-4CD4BCA4154F}.rpt:
Unable to connect: incorrect log on parameters.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Logon failed.
Details: Error Code: 0x
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.Error in File C:\WINDOWS\TEMP\Medea {E48953AA-F243-4F31-92B1-4CD4BCA4154F}.rpt:
Unable to connect: incorrect log on parameters.

Source Error:

 
Line 72: 
Line 73:         If Request.QueryString("t") = "pdf" Then
Line 74:             oStream = oRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
Line 75:             Response.Clear()
Line 76:             Response.Buffer = True

 

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 9:34pm
I don't know. What about creating a dummy report and use the production server database as the original data source. Get that working and then go into debug mode and look at it's ConnectionInfo properties to see if anything looks different from what you are doing. Plus, I would try getting a preview of it on the web page working before doing the export. Start with the simple stuff before adding complexity. These are just things I would play around with if it were me. Something strange is going on in the background and it's a matter of tracking it down and having that "ah ha!" moment.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Jan 2008 at 9:39pm
It says the provider can't be found. Maybe the database provider isn't installed on that server? Have other reports worked on the server, or is this the first one you are trying it with?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
vkcrystal
Newbie
Newbie


Joined: 29 Jan 2008
Online Status: Offline
Posts: 9
Quote vkcrystal Replybullet Posted: 30 Jan 2008 at 12:01pm

Hi Brian,

This is the first report i am trying to deploy on Windows2003 server. It just works fine on my local machine, do you think something with the other Server that i am trying to deploy?  It is so weird that i am getting this error
Thanks
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Jan 2008 at 2:31pm
I wonder if it is a permissions problem as well. ASP.NET needs to have full r/w access over the temp folder with the anonymous account. This is a problem for many people when they get their first report up and running.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
vkcrystal
Newbie
Newbie


Joined: 29 Jan 2008
Online Status: Offline
Posts: 9
Quote vkcrystal Replybullet Posted: 31 Jan 2008 at 3:39pm
I changed the Provider in the Report from SQLNLCI to SQLOLEDB  It Works !!.   aaah... Thanks for your help though
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.063 seconds.