cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal log on issue to SQL 2008

Former Member
0 Kudos

Hi All

I have the prepackaged version of Crystal Reports that came with Visual Studio 2003. I used this previously to create (and use!) reports based on a SQL SERVER 2005 edition.

I have since moved firms and whilst I use the same version of VS SQL server is 2008.

I can create the report, I can browse through the data (in design time) I can view all the other tables/views in my database

I use integrated security on the server which is local to my machine. My log in has the highest permisions you can get (I'm a SYSADMIN); indeed I have even tried to create a 'crystal' log in with a password to connect to the database but EVERY time I try and open the report in run time I get prompted to log onto the database.

Its almost as if the connection detials are 'forgotton' when the app is compiled

Any thoughts as to what caused this weird error?!

Thanks in Advance

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Chris;

Are you passing your logon credentials to the report in your .NET code? Do you have any subreports in the report?

Have a look at our code samples for logon code.

https://www.sdn.sap.com/irj/boc/businessobjects-samples?rid=/webcontent/uuid/80774579-b086-2b10-db91...

Regards,

Jonathan

Former Member
0 Kudos

Thanks for your comment Jonathan;

No there are no sub reports, or am i passing the credentials via code (when I do I still get the same message)

I am using the SQL native client to connect.

When I try and use the Native client for SQL 10 (the 2008 version) I get a message saying that connection string doesnt match OLE DB specs.

Do you think this is a crystal issue or a SQL issue?

Thanks

Chris

Former Member
0 Kudos

Hi, Chris;

What is the version of Crystal Reports you are using?

If you Verify the Database in the report, either in the .NET IDE, or the Crystal Reports Designer, do you get any errors?

Regards,

Jonathan

Former Member
0 Kudos

No and this is what I think is the most bizzare; I can actually browse the the data that the report will contain with no issues.

Its probably the most obvious of problems but its like it forgets the credentials!

Former Member
0 Kudos

Hi, Chris;

What is the version of Crystal Reports you are using?

What code are you using to logon?

Regards,

Jonathan

Former Member
0 Kudos

Hi

Its the version that shipped with VS.NET 2003

Im using the 'wizard' i.e. create new report, select style, select provider, select server etc etc

I would be happy if there was a manual way around this? to use integrated security?

Former Member
0 Kudos

Ive just tried using the sample code:

Private Sub ConfigureCrystalReports()

northwindCustomersReport = New NorthwindCustomers()

Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()

myConnectionInfo.ServerName = "DevDatabase"

myConnectionInfo.DatabaseName = "Northwind"

myConnectionInfo.UserID = "sa"

myConnectionInfo.Password = "1234"

SetDBLogonForReport(myConnectionInfo, northwindCustomersReport)

myCrystalReportViewer.ReportSource = northwindCustomersReport

End Sub

Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)

Dim myTables As Tables = myReportDocument.Database.Tables

Dim myTable As CrystalDecisions.CrystalReports.Engine.Table

For Each myTable In myTables

Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo

myTableLogonInfo.ConnectionInfo = myConnectionInfo

myTable.ApplyLogOnInfo(myTableLogonInfo)

Next

End Sub

after changing the log on details of course I still get the same error!

Former Member
0 Kudos

Hi, Chris;

Version 9.1 of Crystal Reports that you are using would have only been tested against SQL Server 2000. It could simply be that this version will not work connecting to 2008 at runtime.

Is it giving an error, or is prompting for logon? Are you changing from one server to another? What if you connect to the same server the report was made against?

Jonathan

Former Member
0 Kudos

Hi

You may be right but I would have thought that the code that makes it work at design time would run time? It used to work with SQL 2003

Its just prompting for log in details and server name and database name, regardless of what code I put in VB to log in.

Im not changing intentionally and I really dont think I am, as I get the same problem when I used one of the sample apps that were on your link.

Thanks

Chris

Former Member
0 Kudos

Have you tried using OLEDB for SQL Server, rather than the native client? More likely to be compatible.

0 Kudos

Hi Chris,

Crystal has not had a native SQl Server driver since version 8.5 when Microsoft announced they were no longer supporting native connectivity. CR then only supported ODBC and OLE DB drivers. What the Designer is doing is likely using an ODBC driver in the backend.

As John suggested, you'll likely have to convert all your Reports to use OLE DB or ODBC.

Thank you

Don

Former Member
0 Kudos

Yes thats what I've had to do.

When I selected OLE DB SQL SERVER as a dataprovider my instance didnt show up; although when I went so far as to type the instance in instead of relying on the 'auto fill' box it worked!

Proof that been lazy doesnt work!!

PS I think the web registration for the VS2003 has been disabled ... any ideas on that?!

Answers (0)