rptDoc = new ReportDocument();
rptDoc.Load(Server.MapPath("~/Reports/Rpt/CallPendingReport.rpt"));
rptDoc.SetDataSource(dtData);
Session["ReportDataSet"] = rptDoc;
crvCallPendingReport.ReportSource = rptDoc;
crvCallPendingReport.DataBind();
// crvMasterCallReport.RefreshReport();
rptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "CallPendingReport" + DateTime.Now + ".pdf");
cry repo下载问题 - ExportToHttpResponse正在下载没有扩展名的文件, 我正在尝试按照代码下载带有文件名的报告pdf文件,但它正在下载带有扩展名的文件。 任何知道解决方案的机构?
答案 0 :(得分:2)
rptDoc = new ReportDocument();
rptDoc.Load(Server.MapPath("~/Reports/Rpt/CallPendingReport.rpt"));
rptDoc.SetDataSource(dtData);
Session["ReportDataSet"] = rptDoc;
crvCallPendingReport.ReportSource = rptDoc;
crvCallPendingReport.DataBind();
// crvMasterCallReport.RefreshReport();
rptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "CallPendingReport"+ DateTime.Now + ".pdf");