1
votes

I'm working on a C# application with a SQL Server 2008 database and Crystal Reports for reporting. I followed this article to create reports but in the step of entering connection informations I didn't know what is server name, because this is the connectionstring of my database:

"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True.

So my question is what is the server name that I should put in the connection information of Crystal Reports?

Thanks in advance.

1
This is a "free-floating" file-based SQL Server - really bad practice..... there's no server to connect to. I'd recommend adding this database to a server and then you can also reference it from Crystal Reports!marc_s
But my application doesn't need a server, it is a local application that i run i just one pcuser4340666

1 Answers

0
votes

Add this code:

rptobj.SetDatabaseLogon(DatabaseUser, DatabasePassword, SERVER_NAME, DATABASE_NAME)