-1
我能够在最后一行获取字节。我必须将其转换为.doc文件并下载它。如何将字节转换为doc文件并使用C下载它#
irsc = new CustomReportCredentials(ReportServerUserName, ReportServerPassword, ReportServerDomain);
ReportViewer1.ServerReport.ReportServerCredentials = irsc;
ReportViewer1.ServerReport.ReportServerUrl = rptUrl;
ReportViewer1.ServerReport.ReportPath = "/" + ReportFolder + "/" + _reportName;
ReportViewer1.ServerReport.SetParameters(parameters);
ReportViewer1.ServerReport.Refresh();
bytes = ReportViewer1.ServerReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);
请妥善格式化您的问题 – WhatsThePoint
如果你的意图是使从服务器端接收文件的响应,然后将文档作为字节[]是非常好的。你可以直接向客户端回应byte []。只需要指定mimeType,文件名等。 – derloopkat