Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
i have created one windows application and one of my page i created one report genetaing function using crystal report. It is working fine in my system while am running the code.
But after installing the published application in my system it is not working.Error with report
below is the cosde which am using to set crystal report source

Dim Report As New ReportDocument
Report.Load(path) 'path am getting using application.executepath
Report.SetDataSource(<dataset name="">)
reportviewer.ReportSource = Report

but after installing the application i couldnt find the report file (.rpt) in application installed folder(c\programfiles\application).
Why this report is not coming here?
Because of this am getting error that 'failed to load report' (Problem with Report.Load(path) because here report.rpt is not available in application folder )
What is the soltion here?
Posted

1. you should pack report file (.rpt file) with setup
2. set path varible (using reflection) not using application.executepath
Happy Coding!
:)
 
Share this answer
 
Comments
Am Gayathri 4-Jun-13 2:05am    
Thanks but could you please tell me how to use this (using reflection) ??
Aarti Meswania 4-Jun-13 2:11am    
visit link http://msdn.microsoft.com/en-IN/library/aa288411(v=vs.71).aspx

Note ignore merge module
but add prerequiites
http://www.codeproject.com/Questions/444825/In-my-windows-application-I-need-to-install-crysta

and use Add file option by right click on setup project then Add all .rpt files you created

then build

in setup project debug folder you will see setup file and folders which was selected for prerequisite
Am Gayathri 4-Jun-13 2:19am    
Thank u.....
Aarti Meswania 4-Jun-13 2:46am    
Welcome!
Glad to help you! :)
AmIWrong 7-Apr-17 3:47am    
Hello! I know this is not the right way to do things, but I badly needed help. I need a step by step guide in publishing a vb.net 2012 project with crystal report. Please help me.
 
Share this answer
 
Comments
AmIWrong 7-Apr-17 3:31am    
Hello! I know this is not the right way to do things, but I badly needed help. I need a step by step guide in publishing a vb.net 2012 project with crystal report. Please help me.

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