The requested page is not available for the requested platform. You are viewing the content for Default platform.

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.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Interface, Inherited = false)]
public class VisibleInReportsAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Class Or AttributeTargets.Property Or AttributeTargets.Interface, Inherited:=False)>
Public Class VisibleInReportsAttribute
    Inherits 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("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

Implements

See Also