Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

VisibleInReportsAttribute Class

When applied to business classes, specifies whether end-users can create reports on objects of the required class. When applied to a business class property, specifies if the target property is visible in the Report Designer.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v20.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Interface, Inherited = false)]
public class VisibleInReportsAttribute :
    Attribute

Remarks

Decorate the class with this attribute and set the VisibleInReportsAttribute.IsVisible property to true to show an item for the decorated class in the following Data Type drop-down lists:

The value passed as the VisibleInReports attribute’s parameter is set for the IModelClassReportsVisibility.IsVisibleInReports property of the corresponding BOModel | <Class> node.

The attribute parameter’s default value is true. You can apply the VisibleInReports attribute to a class without this parameter to allow users to create reports and analysis on specified type objects and use this class as the document’s data source for the Mail Merge operation.

The following example shows how to apply the VisibleInReports attribute to the TestContact class:

[VisibleInReports]
public class TestContact : BaseObject {
   public TestContact(Session session) : base(session) {}
   private string name;
   public string Name {
      get {
         return name;
      }
      set {
         SetPropertyValue(nameof(Name), ref name, value);
      }
   }
}

When you need to apply the CreatableItemAttribute and NavigationItemAttribute attributes in addition to the VisibleInReports attribute, it is easier to apply a single DefaultClassOptionsAttribute attribute.

Apply the VisibleInReports attribute with the false parameter value to a business class property to hide this property from the Report Designer.

Inheritance

Object
Attribute
VisibleInReportsAttribute
See Also