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
Deepak Kataria
NA
5
1.8k
Error while exporting crystal report into pdf.
Jun 12 2013 4:19 AM
Hi Everybody,
I am getting error in line "
rDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Page.Response, true, "Job-" + abc);" as
"unable to evaluate expression because the code is optimized or a native frame is on top of the call" while exporting report into pdf. Kindly see below code which i am using.
ReportDocument rDoc = new ReportDocument();
try
{
rDoc.Load(Server.MapPath("JobCard.rpt"));
rDoc.SetDatabaseLogon("sa", "Password", "ServerName", "Database");
rDoc.Refresh();
rDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Page.Response, true, "Job-" + abc);
rDoc.Close();
rDoc.Dispose();
GC.Collect();
Response.Redirect("SomePage.aspx", false);
}
catch (System.Threading.ThreadAbortException lException)
{
rDoc.ReportOptions.Dispose();
rDoc.Close();
rDoc.Dispose();
Response.Redirect("SomePage.aspx", false);
}
Thanking in advance.
Reply
Answers (
0
)
how to select all the check boxes in datagrid using vb.net
fileupload control