0
votes

I had developed windows form application year ago, which calculates certain stuff and displays report in Printable text format in crystal reports. I had written certain static text in crystal report and displays report in crystal report. Now there is certain changes in requirement. I need to display the same report in pdf format but without installing crystal report in client pc, because every pc doesn't have crystal report viewer installed, so my company want to directly export to pdf, without installing crystal report.

My report contains, Company Logo, Some forms texts, and the dynamic data which are calculated from windows form application,

1
if you have done the report in CR itself, then I doubt that you would be able to achieve this since even if you are to export directly to PDF it would request for the CR runtime etc. In such a scenario, I would of course use MS Report as it is bundled with Visual Studio.fujiFX
If you have a Crystal Report, you need to have at least the runtime of CR installed on the computer to render the report - into whatever output format you want. You cannot render a CR report without any trace of CR on your machine...marc_s
So,, it is impossible to convert crystal report to pdf without installing crystal report runtime in client pc???Puskarkc007
Yes, it's impossible - if you have a Crystal Report in your application, there must be at least the CR runtime on that computer using the appmarc_s
It means,, its not possible to convert into Word, Excel any format without installing CR runtime on the pc using the app.Puskarkc007

1 Answers

0
votes

If you have a web service, wcf or web api that can create the report on the server where you have Crystal Reports installed and export it to pdf, all you need to do is to call that service and it should return a byte array that you will populate by reading the pdf file with:

File.ReadAllBytes(path)