Report Viewer应用程序问题 [英] Report Viewer app problem

查看:79
本文介绍了Report Viewer应用程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我已经构建了一个封装报表查看器控件的Winforms .net程序集(dll)(启用了com)。从.net exe启动它时它工作正常。当从vb6应用程序启动它时,它会在所有具有表达式的表单上崩溃(可能是使用microsoft.reportviewer.processingobjectmodel.dll)。该错误发生在"localreport.setparameters"上。电话。

I've built a Winforms .net assembly (dll) (com-enabled) that encapsulates the report viewer control.  When launching it from a .net exe it works fine.  When launching it from a vb6 app it crashes on all forms that have expressions (presumably that are using microsoft.reportviewer.processingobjectmodel.dll).  The error occurs on the "localreport.setparameters" call.

确切的错误是:

本地处理期间发生错误。无法加载表达式主机程序集。详细信息:无法加载文件或程序集'expression_host_c69db59c9e3b4b98a64876ea5cb1a0bc。版本10.8.5072762,Culture = neutral,PublicKeyToken = null'或其依赖项之一。无法授予执行权限(异常形式HRESULT 0x80131418

An error occurred during local processing.  Failed to load expression host assembly.  Details: Could not load file or assembly 'expression_host_c69db59c9e3b4b98a64876ea5cb1a0bc.  Version 10.8.5072762, Culture=neutral, PublicKeyToken=null' or one of its dependencies.  Failed to grant permission to execute (Exception form HRESULT 0x80131418

Expression_host _...的数字部分似乎会根据启动应用程序的内容而改变。

The numeric portion of expression_host_... seems to change depending on what launches the app. 

看起来这是一个安全问题.net不知道来自com的安全权限,但世界上的是什么"expression_host ._..."?????这不是我写的任何东西,它确定看起来不像是Microsoft .net的东西!有什么建议或解决方法吗?

It looks like it's a security thing that .net doesn't know the security permissions coming from com but what in the world is "expression_host._..." ?????  It's not anything I wrote and it sure doesn't look like a Microsoft .net thing!  Any suggestions or workarounds?

谢谢

Glenn

推荐答案

如果有其他人遇到这个我通过改变来实现它


Me.rvReport.LocalReport.ExecuteReportInCurrentAppDomain(AppDomain.CurrentDomain.Evidence)

Me.rvReport.LocalReport.ExecuteReportInCurrentAppDomain(AppDomain.CurrentDomain.Evidence)


To


Me.rvReport.LocalReport.ExecuteReportInCurrentAppDomain(System.Reflection.Assembly .GetExecutingAssembly()。证据)

我不知道为什么会产生差异,但确实如此。

GlennL


这篇关于Report Viewer应用程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆