Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 3-May-19 2:16am

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

C#
protected class A
    {
    protected int I;
    }
public class B
    {
    public A a = new A();
    }
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.
 
Share this answer
 
ABCD

ABCD

ABCD

ABCD

ABCD
 
Share this answer
 
Comments
CHill60 3-May-19 8:56am    
Do not do this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900