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.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
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:
in the Report Wizard
in a Detail View with the Pivot Chart
in a Detail View of a Mail Merge Template
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 virtual string Name { get; set; }
}
// Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.
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.