cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports location in the Windows application

Former Member
0 Kudos

Hello,

I'd created several C# Web applications with the Crystal reports 2008. But this is the first time that I'm creating a Windows application with Crystal reports. In fact I'm working almost exclusively with the Web application, so I don't have much experience with Windows (VS 2005).

So my question is - what is the right place to put Crystal reports in Windows application, and how should I refer to them?

In the Web application I could put the reports, for instance, to the Reports folder in the root of the application, then to refer to them this way:

sReportPath = Server.MapPath("../Reports/Payout2.rpt");

If I do the same in Windows application and use something like this:

sReportPath = Path.GetFullPath("Reports
Payout2.rpt");

it will give me the absolute path to the report. But how it would work after I install the application to the user's computers?

I would appreciate your suggestions. This should be a simple question for anyone who works with the Windows applications, but I'm pretty new to this.

Thank you,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Couple of suggestions.

1) you'd have to know where the reports will be. So, if you are supplying the reports with your app, your deployment would need to create the directory where the app expects the reports to be and then of course, ensure that the report also get installed into the directory.

2) get the setup program to copy the report files into your app directory and then use app path to load the reports.

Ludek

Former Member
0 Kudos

Thank you, Ludek, I'll try to make this happen.

Answers (0)