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");

cry repo 下载中的问题 - ExportToHttpResponse 正在下载没有扩展名的文件,我正在尝试按照代码下载带有文件名的报告 pdf 文件,但它正在下载没有扩展名的文件。任何机构知道解决方案?

4

1 回答 1

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");
于 2013-05-14T05:20:38.540 回答