Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Helloe Every One,

i am very much new to .Net , i developed one windows application with Crystalreport, i gave the path of crystalreport as my local drive like E:\\MyProject\\Reports\\ReportName.Rpt
the application is working fine but it getting error on clinet side that 'report failed', becoz the client system does not locate the correct path. so my question is how to give the crystalreport path so that client can also access the report.thanks
Posted
Comments
Shahriar Iqbal Chowdhury/Galib 18-Dec-10 1:59am    
is this desktop app or web app? locating file in web app is different from desktop app.
amshan1 18-Dec-10 2:10am    
this is desktop application i already explained this is wiondows Form
Abhinav S 18-Dec-10 5:53am    
You sure rights to the folder are correctly setup?

Hi amshan,

Use Application.StartupPath + "\\" + "ReportName.Rpt".

Regards.

Andy
 
Share this answer
 
v2
Comments
amshan1 18-Dec-10 2:30am    
i already did but nothing change
RaviRanjanKr 18-Dec-10 2:35am    
Good Answer..
jerrykid 31-Dec-10 2:27am    
Copy ReportName.Rpt into your Project. After that right click->Properties->Copy to Output Directory->Copy always
jerrykid 31-Dec-10 2:29am    
When you setup or copy project to other location, please include/copy all in Bin\Debug or in Bin folder.
Yup, The problem is occur because you set a defined path and when application run on client application it move for this defined path which is not as same as you defined then.
To overcome the problem you should placed your Crystalreport file in your ApplicationStarup path which is inside bin\Debug of your application and have to set path as
Application.StartupPath +"\\"+"ReportName.Rpt"
 
Share this answer
 
v2

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