我直接呈现给客户的报告RDLC,试图在页脚使用下面的代码添加页码RDLC报告导出为PDF页码在页脚
=Globals.PageNumber & " of " & Globals.TotalPages
我得到#错误时报告在客户端以PDF形式呈现。需要帮助来解决错误。
我直接呈现给客户的报告RDLC,试图在页脚使用下面的代码添加页码RDLC报告导出为PDF页码在页脚
=Globals.PageNumber & " of " & Globals.TotalPages
我得到#错误时报告在客户端以PDF形式呈现。需要帮助来解决错误。
我想你想
=Globals!PageNumber & " of " & Globals!TotalPages
我把它解决了。 我开始创建另一个页面,但最终删除了引用Microsoft.ReportViewer.WebForms并将正确的版本读回 我认为这解决了我的问题。欢呼。
迟到的答案,但对我来说这是一个安全问题。
我检查了从渲染方法收到的警告。
Warning[] warnings; //<-- Check these errors
var reportData = localReport.Render("PDF", null, out mimeType, out encoding,
out fileNameExtension, out streamIds, out warnings);
发现了以下错误:
The Value expression for the textrun ‘PageNumber.Paragraphs[0].TextRuns[2]’ contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
溶液渲染之前添加以下行:
localReport.SetBasePermissionsForSandboxAppDomain(AppDomain.CurrentDomain.PermissionSet.Copy());
仍然是#错误你可以得到一个渲染代替页码 – inlokesh 2011-05-31 20:19:09
错误信息? – jimconstable 2011-06-01 02:21:06