Reputation: 305
I am developing a WinForms C# application using Visual Studio 2019 that uses Crystal Reports.
I am using the following code to load the report, it uses the path of crystal report file:
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(Application.StartupPath + "\\CrystalReport1.rpt");
After the deployment this produces an error that the File is not found in the specified path
The Crystal report file is actually embedded,
how can I access the embedded report after deployment?
Upvotes: 0
Views: 430
Reputation: 88
Be sure the file is set to
Build Action >> Content; Copy to Output Directory >> Copy always
Upvotes: 1