Showing Crystal Reports in pdf format without using Crystal Reports Viewer

Hi,
 Most of the samples/approaches I have seen so far for Crystal Reports implementation in ASP.Net  is through Crystal Reports Viewer.

Here is another approach I can think of.

1.   Create the rpt file.
2.   Get data from WebServices.
3.   Bind the data to the rpt file by setting the SetDataSource property of the rpt file.
4.   Export the report to stream by calling the ExportToStream method of the rpt file
5.   Finally in the aspx page I set the Content type to application/pdf and then do a response.OutputStream.Write to output out the stream on to the browser. So finally the report is output out as pdf.

Is this a right approach. Does any one find any issues/pitfalls/advantages with this kind of approach. Is this approach ok or is it necessary to use the CrystalReportViewer Control.

Please share some thoughts on the same

Thanks in Advance
Regards
Sai

P.S Note that here I want the final output to be a pdf



Answer this question

Showing Crystal Reports in pdf format without using Crystal Reports Viewer

  • Eric23

    Hello Sai,

    If you would like your final output to be pdf then this is a great solution.

    The biggest draw back is that you lose the interactive abilities of the viewer - things like drill down, group tree etc.

    Keith - Business Objects



  • Sreekanth Ammisetty

    Hi,
    I'm using the exact approach that Sai described on our ASP.Net 1.1 site using Crystal Reports published as PDFs. When I converted the site using Crystal Reports & VS.Net 2005 though the PDFs that get created have smaller sized fonts and the report looks different. The barcodes on our packing slips are so tiny that it makes them unreadable and some of them disappear. I am using Crystal Reports for VS.Net 2005 RC 1. Is there a fix for this

    James Conley
    james.conley@gmail.com


  • Showing Crystal Reports in pdf format without using Crystal Reports Viewer