Crystal Reports Problem - Database Login

  • Thread starter Thread starter gduvall
  • Start date Start date
G

gduvall

I have an application that uses Crystal Reports using stored
procedures. The application worked fine using VisualStudio 2003.
However, when I upgraded to VS 2005 I started getting a popup screen
when I ran the application requesting a database login. The popup was
strange to me (I am just starting with VisualStudio). The server name
is pre-populated with one of the two datasets and is protected (I
cannot change it), the database field is blank and protected and it
doesn't matter how I try to login, it fails. Code snippet below.

Any suggestions will be appreciated.

oRpt.SetDataSource(myDS)
oRpt.SetParameterValue("SortOrderDesc", SortDesc)
oRpt.SetParameterValue("TerminationDate", dteRptDate)

CrystalReportViewer.ReportSource = oRpt
SetCrystalLogin(Me.CrystalReportViewer)
conn.Close()

End Sub
Shared Sub SetCrystalLogin(ByRef MyCrystal As CrystalReportViewer)

Dim i As Integer

For i = 1 To MyCrystal.LogOnInfo.Count
With MyCrystal.LogOnInfo(i - 1).ConnectionInfo
.ServerName = "dw-dev"
.DatabaseName = "imdsplus"
.UserID = "xxxxxx"
.Password = "yyyyyyy"
End With
Next i
End Sub
 
I have an application that uses Crystal Reports using stored
procedures. The application worked fine using VisualStudio 2003.
However, when I upgraded to VS 2005 I started getting a popup screen
when I ran the application requesting a database login. The popup was
strange to me (I am just starting with VisualStudio). The server name
is pre-populated with one of the two datasets and is protected (I
cannot change it), the database field is blank and protected and it
doesn't matter how I try to login, it fails. Code snippet below.

Are sure that the SQL Server database has the user-id and psw created for
it?
Are you sure the SQL server is using mixed mode authentication or Sql
User-id and psw authentication?

I don't think you have Crystal Report problem. You have a SQL Server
authentication problem with the credentials you're giving.
 
Are sure that the SQL Server database has the user-id and psw created for
it?
Are you sure the SQL server is using mixed mode authentication or Sql
User-id and psw authentication?

I don't think you have Crystal Report problem. You have a SQL Server
authentication problem with the credentials you're giving.

I have stepped through the debugger and can see that rows have been
retrieved from the database in code prior to what I displayed in my
original post. The error seems to occur at the code line
CrystalReportViewer.ReportSource = oRpt

I could send an image of the screen I get when trying to run the
report.
 
I know this is a really old post but I just had the same problem yesterday, saw this post, thought it the answer to my prayers, only to find out there was no solution! I did finally figure out what the problem was so here's what fixed it for me...

Open up the report in Visual Studio, In the field explorer, right-click on Database Fields and select Set Database Location. In the Current Data source panel at the top, under SQL instance name, expand Properties. My problem was that I had the Provider was wrong - I set it to SQLOLEDB and, hey presto, problem fixed!

Hope this is helpful.
 
Back
Top