How to connect to Database file in App_Data folder in ASP.Net for Crystal Reports Database Fields ???
I have made a web project. In that, right clicked the website name in the solution explorer. Then chose add new item - SQL Database. Then a database file named Database.mdf was added to the App_Data folder in the website.
This is the database that I use in the project for each and every information.
On one page, I want to generate a report so as to facilitate printing that info. For this, I have added a crystal report to the website. The report takes one parameter i.e. id. Based on that, the other data in the database's table will be displayed in the report. For this, first we have to select the Database expert to connect to a particular database so that the columns of the selected table are displayed in the Field Explorer of the Crystal Report.
But, I am not getting the way to connect to the Database.mdf file using the Database Expert......
Have selected the OLE DB provider for Sql Server, after that, I dont know what Server, Username, Password, Database name to write. The connection string of the local database file as mentioned in Web.config is:
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
Tried using DataSet as DataSource. But, no fields are being displayed on putting condition on Id field to be equal to the parameter(id) passed to it.
Plzzzzzzzzzzz reply...... Project on stake!.......