Ssrs 2008 将reportviewer呈现为PDf会影响显示
在执行“serverreport.render”以PDF格式打印报告后,交互式排序在网页上不起作用 下面是我的代码Ssrs 2008 将reportviewer呈现为PDf会影响显示,ssrs-2008,reportviewer,reporting-services,reportviewer2008,Ssrs 2008,Reportviewer,Reporting Services,Reportviewer2008,在执行“serverreport.render”以PDF格式打印报告后,交互式排序在网页上不起作用 下面是我的代码 private void Print() { HttpContext cont = HttpContext.Current; HttpResponse myRes = cont.Response; System.Web.SessionState.HttpSessionState mySess = cont.Session; string enCod
private void Print()
{
HttpContext cont = HttpContext.Current;
HttpResponse myRes = cont.Response;
System.Web.SessionState.HttpSessionState mySess = cont.Session;
string enCoding = null;
string strNull = null;
string strPDF = "PDF";
enCoding = Request.Headers["Accept-Encoding"];
string mimeType = "application/pdf";
string extension = ".pdf";
string[] streamids = null;
Warning[] warnings = null;
byte[] mybytes = null;
mybytes = ReportViewer1.ServerReport.Render(strPDF, strNull, out mimeType,
out enCoding, out extension, out streamids, out warnings);
myRes.Buffer = true;
myRes.Clear();
myRes.ContentType = "application/pdf";
myRes.AddHeader("Content-disposition", "filename=output.pdf");
myRes.BinaryWrite(mybytes);
myRes.Flush();
myRes.End();
}
显然,将报告呈现为PDF会把事情搞砸
欢迎所有建议
谢谢
David如果您需要在web界面上提供交互式排序,则需要通过报表查看器或HTML(但不是MHTML)显示报表 将报表呈现为报表查看器或HTML以外的任何对象后,交互式排序将不可用