Hello,
I am trying to export crystal report to pdf in asp.net, though the code is working well on localhost but on server I get error
HTTP Error 500.23 - Internal Server Error
An ASP.Net setting detected that does not apply in Integrated managed pipeline mode.
The crystal report is showing abnormal behaviors.I am using a CrystalReportViewer on which i have set the CrystalReportSource1 using the viewer Tasks.
The code on page load is :-
cn.Open();
DataSet ds = new DataSet();
string sql = "select * from Test";
OleDbDataAdapter da = new OleDbDataAdapter(sql, cn);
da.Fill(ds);
rdoc.Load(Server.MapPath("~/CrystalReport2.rpt"));
rdoc.FileName = Server.MapPath("~/CrystalReport2.rpt");
rdoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rdoc; rdoc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true, txtID.Text);
cn.Close();
I am getting 500.23 & 500.19 errors.
During the troubleshooting i encountered another unusual issue, where i tried a new crystal report with just simple report. That simple crystal report is not showing data & the toolbar images are not rendered. I googled on this but didn't found conclusive thing.
I hope my issue is clear. Please not my main motive is to achieve pdf versin of crystal report. Help me, on how can i achieve this without hassle.
Regards