.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Crystal Report Problem

Posted By: Ruchi     Posted Date: March 13, 2009    Points:2   Category :ASP.Net
While designing crystal report i am facing a problem that when i try to run my project on any other PC in crystal report it gives connection error and takes default connection to the SQL Server in which it was designed.

i.e How can i set connection string dynamically for the crystal reports?

Author: Rahul             
Posted Date: March 13, 2009     Points: 5   

Are you using C# or .NET to build your crystel reports? if yes than you can pass the datasource to any ADO.NET objects like dataset


OleDbConnection Conn = new OleDbConnection(connString);

OleDbDataAdapter adepter = new OleDbDataAdapter(yourQuery, connString);
DataSet ds= new DataSet();

objRpt.SetDataSource(ds); //Set the datasource
crystalReportViewer1.ReportSource = objRpt; // your crystel report viewer

Author: Ruchi             
Posted Date: March 14, 2009     Points: 5   

Hi Rahul,
Thanks for the reply. but when i run the application then for report it says that it requires further information and asks for login,database details,etc.

one other problem is currently i dont have SQL server installed on my PC. so how can i design n use my reports with the database in my application i.e in app_data folder.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend