How to display Crystal Report?

Broorbtam

New Member
I am getting this error while displaying crystal report.what do i need to do.A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Code i am using is as follows :
\[code\]protected void Page_Load(object sender, EventArgs e){ SqlConnection con = new SqlConnection("Data Source=./SQLEXPRESS;AttachDbFilename=~/App_Data/Database.mdf;Integrated Security=True;User Instance=True"); DataSet1 ds = new DataSet1(); SqlDataAdapter da = new SqlDataAdapter("SELECT ID, Name, Dept, Salary FROM dbo.Table2", con); da.Fill(ds.View2); ReportClass myReportObject = new ReportClass(); myReportObject.ResourceName = "CrystalReport1.rpt"; }\[/code\]
 
Back
Top