Custom report items use classes from the Microsoft.ReportDesigner namespace. The classes used to implement a custom report item can be grouped into two main categories: unique classes designed to support custom report item infrastructure, and managed wrapper classes that encapsulate the functionality of relevant Report Definition Language (RDL) elements. For a code sample on how to use these classes, see SQL Server Reporting Services Product Samples.
Custom Report Item Infrastructure Classes
The following classes are used to implement a custom report item.
The following tables are not complete listings; they include only the most commonly used properties and methods for each class.
This is the main custom report item class. The main class of your custom report item implementation must inherit from this class.
|Name||The name of the custom report item.|
|Type||The type of the custom report item.|
|CustomData||A CustomData object that encapsulates the custom report item data properties specified at design time.|
|CustomProperties||A collection of custom properties for the custom report item.|
|Height||The height of the custom report item control.|
|Width||The width of the custom report item control.|
|Report||A container for the report-level properties, such as the list of datasets in the report.|
|AltReportItem||The alternate report item object, to be used where the custom report item run-time control is not supported.|
|Style||The style properties for the custom report item.|
|Adornment||An adornment window used for interactive editing of the control.|
|Site||The ISite of the component.|
|DesignerVerbCollection||An array of custom verbs for the control’s shortcut menu.|
|BeginEdit||Activates interactive editing for the control.|
|DoDefaultAction||Called in response to double-clicking or pressing Return on the control.|
|EndEdit||Deactivates interactive editing for the control.|
|GetService||Returns an object which represents a service.|
|InitializeNewComponent||Called when a new custom report item is created.|
|Invalidate||Repaints the entire surface of the control.|
|Called when an object is dragged onto the control.|
|OnPaint||Called in response to the Paint event.|
This is the attribute used to identify the type of the custom report item. The name must match the value of the <Name> attribute of the ReportItem element in the Report Designer configuration file.
|CustomReportItemAttribute||Constructs the CustomReportItemAttribute object.|
This is the attribute used to specify display name to use for the custom report item designer.
|LocalizedNameAttribute||Constructs the LocalizedNameAttribute object.|
The Adornment class is used by the custom report item design-time component to provide areas outside of the main rectangle of the design surface. These areas can handle user interface events, such as mouse clicks and drag-and-drop operations.
|OnShow||Called when the Adornment is activated.|
|OnHide||Called when the Adornment is deactivated.|
|Paint||Called in response to the Paint event.|
|Called when an object is dragged into the Adornment.|
This class is used to provide a collection of display services used by the custom report item to support Adornment objects for the custom report item design-time component.
|AdornerWindowBounds||The bounds of the Adorner window.|
|AdornerWindowRegion||The region of the Adorner window.|
|AdornerWindowGraphics||A graphics context for the Adorner window.|
|ComponentRectInDesignerFrame||Returns the bounds of the component translated into designer frame coordinates.|
|InvalidateAdorner||Invalidates the Adorner window.|
|PointToAdorner||Returns a point in screen coordinates translated to Adorner window coordinates.|
This class can be used from your custom report item design-time control to invoke the Expression Editor.
|EditValue||Invokes the Expression Editor, initialized with the given object value.|
This class is a collection of Reporting Services fields, and is used to support drag-and-drop events in the design environment. Inherits from IReportItemDataObject.
|DataSetName||The name of the dataset containing the fields to be dropped.|
|Fields||The collection of fields (Microsoft.ReportDesigner.Field) to be dropped.|