我是使用 SSRS 的新手。我正在使用.rdlcVS 2012 生成 PDF 报告的文件。当我尝试设置如下参数时
ReportParameter param = new ReportParameter(kvp.Key, kvp.Value);
LocalReport.SetParameters(param);
Run Code Online (Sandbox Code Playgroud)
这会引发异常:
本地报告处理期间发生错误。报告“”的定义无效。无法加载文件或程序集“System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。访问被拒绝。
{Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report '' is invalid. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String …Run Code Online (Sandbox Code Playgroud) asp.net-mvc windows-server-2008 reporting-services visual-studio-2012
我有一个包含按钮的小应用程序(localhost:55777)窗口。我正在另一个应用程序(localhost:3214)中以弹出窗口的形式打开此应用程序。
我希望在单击托管在 (localhost:55777) 的上述按钮时关闭弹出窗口(托管在 localhost:3214)。为此,我使用 window.postMessage() 并通过 addListener 处理消息事件。
完整的代码在这里:
应用程序 1(发件人) http://localhost:55777:
<button id="closeme" onclick="closeParent()">Close Parent</button>
Run Code Online (Sandbox Code Playgroud)
JS:
function closeParent() {
window.postMessage("closePopUp", "http://localhost:3214");
return false;
Run Code Online (Sandbox Code Playgroud)
}
应用程序 2(接收方):http://localhost:3214
JS:
function receiveMessage(event) {
if (event.data == 'close') {
alert("Message received");
}
}
addEventListener("message", receiveMessage, false);
Run Code Online (Sandbox Code Playgroud)
现在,当调用 postMessage 时,接收方永远不会命中方法。出现错误:
无法在“DOMWindow”上执行“postMessage”:提供的目标源(“ http://localhost:3214 ”)与收件人窗口的源(“ http://localhost:55777 ”)不匹配。
有人可以建议解决这个问题吗?我正在使用 jquery 和脚本类型。
根据要求,我在我的VIEW上有一个Kendo UI网格.但是很遗憾,读取功能没有在控制器中被击中.这很烦人,我遇到了同样的问题,即使每个人看起来都像文件一样在http://demos.kendoui.com/web/grid/index.html上提供.这是我的查看代码:
@(Html.Kendo().Grid<StudentManagement_Models.Student>()
.Name("studentsGrid")
.Columns(columns =>
{
columns.Bound(p => p.Id).Groupable(false);
columns.Bound(p => p.FirstName);
columns.Bound(p => p.MiddleName);
columns.Bound(p => p.LastName);
columns.Bound(p => p.CGPA);
})
.AutoBind(true)
.Pageable()
.Navigatable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetAllStudents", "Student"))
)
)
Run Code Online (Sandbox Code Playgroud)
这是我的控制器动作:
public ActionResult GetAllStudents([DataSourceRequest] DataSourceRequest request)
{
//Thread.Sleep(2000);
StudentManagement_Models.Student student = new StudentManagement_Models.Student();
StudentHelper helper = new StudentHelper();
student.SavedStudents = helper.GetAllStudents();
return Json(student.SavedStudents.ToDataSourceResult(request));
}
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?我错过了什么吗?请提出建议.
提前致谢.