Display PDF and Excel export options in Crystal Reports? - c#

I need to Remove the Word, Rpt and rtf option in Crystal report Export option. Is it possible?
I need only two option pdf and Excel. If possible please advice.

Using CRVS2010 , you can remove unwanted export Option.
A new feature of CRVS2010 is the ability to modify the available export formats from the viewer export button. The following C# sample code demonstrates how to set the CrystalReportViewer to export only to PDF and Excel file formats:
int exportFormatFlags = (int)(CrystalDecisions.Shared.ViewerExportFormats.PdfFormat | CrystalDecisions.Shared.ViewerExportFormats.ExcelFormat);
CrystalReportViewer1.AllowedExportFormats = exportFormatFlags;
For More Details Please refer below link..
http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2011/01/26/export-file-formats-for-sap-crystal-reports-for-vs-2010

Related

Report Viewer Export to PDF (ASP.NET)

I have report viewer in asp.net project with C#.
I see the report good in Chrome, and in the toolbar I have option to export it to:
pdf /word / excel.
export to word and excel work good, but when I export it to PDF, it's seperate the report to 3 diffrent pages. (altough it's enter in 1 page)
How can I fix that? and export it to one PDF page . (like the word)
(I attach picture to show the diffrents:
http://oi61.tinypic.com/mvgayw.jpg
)
You need to check the Report page orientation and your page and body margins to ensure they fit in the page size you are using.
Please refer to this previous answer for details:
How to get rid of blank pages in PDF exported from SSRS

Exporting a SSRS 2008 report to RTF

I am using Microsoft.ReportViewer to display SSRS reports from my C# desktop application. The ReportViewr by default provides the 3 modes of export features, 1. Excel. 2. Word, 3. PDF. Now we want another export capability of RTF. Does any one have any idea how to convert the SSRS reports to RTF format?
SQL Server Reporting Services does not support RTF as a rendering format out of the box. If you want this functionality you have two options:
1) Develop a custom rendering extension
or
2) Buy a third-party solution, for example this one
If you can export it to a word file, you can use the word interop to read the file, select all, copy and paste to a richtextbox. You can get the rtf format from the RTF property of the richtextbox.

Editable Word Document Report in DevExpress

I am generating my Report using DevExpress third party tool. my requirement is i have to print report in editable word document that end user can edit text and print.
DevExpress has a sample on how to export to doc/docx: http://devexpress.com/Support/Center/Example/Details/E4530
Needs DevExpress version 2012.2.6 to work though. If you don't have that version I think you need to check for other solutions.
You can use XtraReport.ExportToRtf(). See here for the documentation
Microsoft Word will open and save an .rtf document without any problems. If you really need the output in .doc or .docx format, have a look at this answer.

How to export crystal report directly to pdf in c# 2010?

How to export crystal report to pdf directly, instead of saving on disk, it open and user has to save it through pdf file option.
I have tried , export to disk , export functions but none work as required...
I have taken reference from these pages
http://www.tek-tips.com/viewthread.cfm?qid=1398387
http://www.tek-tips.com/viewthread.cfm?qid=1028856
http://social.msdn.microsoft.com/Forums/en/vscrystalreports/thread/3201734e-8e88-4b04-b7f5-848ac1ce4fb5
http://forums.asp.net/t/1585859.aspx/1
Any help will be appreciated. Thanks.
I am Currently using vs 2010 c# and sql server 2005 and Sap Crystal Report.
In order to open the crystal report in PDF format, you first need to save it. You should export the PDF to a temp folder (eg: System.IO.Path.GetTempPath()), then open it.
If your user wants to keep it, he can save it where he wants.
In fact, if you look at the Crystal Report Viewer, it does the same exact thing. It saves the .rpt using a guid then open it.

Export unformatted Excel data from Crystal Reports

I need to export excel file with crystal report.
Is there any way to export data only without formatting by using code?
You can export data shown in the report without formatting, in different ways:
1- Replace the CrystalReportViewer Control with the ReportExporter Control. It will export the report in the format you choose.
2- Call ExportToHttpResponse method
CrystalReportSource1.ReportDocument.ExportToHttpResponse(ExportFormatType.ExcelRecord, this.Response , false, "report.xls");`
3- Call ExportToDisk method
reportDocument.ExportToDisk(ExportFormatType.ExcelRecord, "report.xls");
4- Export dataset to excel (Look at Ahmed answer)
You can choose the way that best fits your needs, but you must try if it works with the runtime you use either in development or in release server.
ExportFormatType.ExcelRecord means that is generated an xls file, without formatting. If you set ExportFormatType.Excel fields that are marked as "Can Grow" are merged with an otherwise blank row below them..

Categories