Create PDF, Excel or Word File from Crystal Report from Code
Posted on 8/31/2009 5:25:13 AM
in #ASP.NET 2.X
Hi,
Some times when working with crystal report viewer you do not want to show the report to user in raw format but instead you want to pass on the report in PDF or other format without requiring user to do extra click. This can be done easily in Dot Net with the following code. /P>
MyReport report = new/SPAN> MyReport(); /P>
DataSet ds = GetData(); /P>
report.SetDataSource(ds); /P>
report.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");/P>
/o:p>/P>
If you want you can use different format for export like PDF, word, Excel by changing the ExportFormatType enumeration value./P>
/o:p>/P>
Vikram/P>
|
Posted on 10/1/2009 9:55:15 PM
I'm studying studying MCA. thank u
/p>
|
Posted on 12/12/2009 4:25:33 PM
this is good article.it helps a lot when a client want report in different format.
thanking you for this article.
/p>
|