Click here to Skip to main content
15,913,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good Day All

How do I configure crystal reports in c sharp in such a way that I don't have to change the path of where the file is located each time I install my app into another computer. I want to be able to load the report from the root folder of my application.

thanks in advance
Regards
Posted
Comments
ali_heidari_ 17-Feb-13 18:49pm    
if i understand correctly, you want access to your database for crystalreport!yea?

1 solution

for AttachDbFilename in your connectionstring use this style :
C#
AttachDbFilename=|DataDirectory|\DATABASENAME.mdf

you need add datasource before adding crystalreport item. wizard of the datasource will make for you fit Connectionstring!
 
Share this answer
 
v2
Comments
Georges23 18-Feb-13 1:10am    
can you please elaborate some more
ali_heidari_ 18-Feb-13 1:47am    
did you use wizard to make crystalreport file?

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