如何解决不一致的可访问性:字段类型'crystaldecisions.web.crystalreportviewer'比字段'purchaseorderapplication.productreport1.crystalreportviewer1页面更难访问 [英] How to solve inconsistent accessibility: field type 'crystaldecisions.web.crystalreportviewer' is less accessible than field 'purchaseorderapplication.productreport1.crystalreportviewer1 page

查看:136
本文介绍了如何解决不一致的可访问性:字段类型'crystaldecisions.web.crystalreportviewer'比字段'purchaseorderapplication.productreport1.crystalreportviewer1页面更难访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误在Web应用程序中运行crystal报表时出现。



Error Coming while running the crystal report in web application.

Inconsistent accessibility: field type 'CrystalDecisions.Web.CrystalReportViewer' is less accessible than field 'PurchaseOrderApplication.ProductReport1.CrystalReportViewer1'	E:\AMIT_SINGH\PurchaseOrderApplication\PurchaseOrderApplication\ProductReport1.aspx.designer.cs





我尝试过的事情:



我尝试了很多改变然后也遇到了同样的问题。

我为数据报告创建了一个空白页。



What I have tried:

I have tried lots of changes and then also getting same issue.
I have created one blank page for the data report.

推荐答案

当你开课时,你不能这样做:



When you drive a class, you can't do this:

protected class A
    {
    protected int I;
    }
public class B
    {
    public A a = new A();
    }

因为您实际上正在升级整个受保护类以使其成为公共类 - 因为整个A类现在可以通过B类实例使用,所以使用B的代码也需要能够访问完整的A类定义,而A的 protected 状态意味着在类之外是不可能的,它是派生的实例。



可能,你的CrystalReportViewer1被声明为公共或类似。

Because you are effectively "upgrading" the entire protected class to become public - since the entire A class is now available via the B class instance, the code that uses B also need to be able to access the full class A definition, and the protected status of A means that isn't possible outside the class and it's derived instances.

Probably, your CrystalReportViewer1 is declared as public or similar.


ABCD



ABCD

ABCD




ABCD




ABCD




ABCD


这篇关于如何解决不一致的可访问性:字段类型'crystaldecisions.web.crystalreportviewer'比字段'purchaseorderapplication.productreport1.crystalreportviewer1页面更难访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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