TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark White
NA
2
1.1k
Exporting to PDF of crystal report throws Exception
Jan 19 2017 12:14 AM
Hi,
I am trying to Export crystal Report to PDF and tried numerous steps you can refer my other posts HERE: https://www.codeproject.com/Questions/1165812/Exporting-crystal-report-to-PDF-gives-missing-para
but none of them worked. Recently I tried using this code:
cryRpt =
new
ReportDocument();
cryRpt.Load(
"E:\\Office\\Clients\\Bombay Restaurant\\Banquet New - MySql\\Banquet New\\RPTBanQoute.rpt"
);
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
try
{
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions =
new
DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOptions =
new
PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName =
"c:\\csharp.net-informations.pdf"
;
CrExportOptions = cryRpt.ExportOptions;
{
CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
CrExportOptions.FormatOptions = CrFormatTypeOptions;
}
cryRpt.Export();
}
catch
(Exception ex)
{
MessageBox.Show(ex.ToString());
}
But this gave me an exception :
So what am I dong wrong , I am also passing around 4 parameters to this RPT
Reply
Answers (
0
)
How to repeat the SSRS design for multiple time ?
How to create detail sub report and main report in crystal?