Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

How can i configure Crystal report datasource in app config?
so that every time the server change, i can easily change the report data source on app.config like changing the connection, do you have a tutorial or sample code that is similar tom problem? thanks in advance
Posted
Comments
DamithSL 2-Jun-14 2:55am    
it depend on how you set the report data source. can you update the question with the related code?
for example if you set the data source as from DataSet by code, you can get read the connection string from app config and load the data set at run time

1 solution

 
Share this answer
 
v3
Comments
Cuculala 2-Jun-14 2:50am    
I dont have a problem on the connection string,
Is that possible to add my report source on the app config?
Abhishek Pant 2-Jun-14 2:53am    
check out the last link updated
Cuculala 2-Jun-14 3:46am    
i have this connection on my app.config
<add name="ConMe" connectionstring="Data Source=myDSource;Initial Catalog=db_sample;Integrated Security=True; ">

Can i use "ConMe" on the report.DataSourceConnections[0].SetConnection(strServer, strDatabase, strUserID, strPwd) instead?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900