TechNet
Export (0) Print
Expand All

Custom Report Item Class Libraries

 

Applies To: SQL Server 2016 Preview

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.

The following classes are used to implement a custom report item.

System_CAPS_ICON_note.jpg Note


The following tables are not complete listings; they include only the most commonly used properties and methods for each class.

Microsoft.ReportDesigner.CustomReportItemDesigner

This is the main custom report item class. The main class of your custom report item implementation must inherit from this class.

Public Properties

NameThe name of the custom report item.
TypeThe type of the custom report item.
CustomDataA CustomData object that encapsulates the custom report item data properties specified at design time.
CustomPropertiesA collection of custom properties for the custom report item.
HeightThe height of the custom report item control.
WidthThe width of the custom report item control.
ReportA container for the report-level properties, such as the list of datasets in the report.
AltReportItemThe alternate report item object, to be used where the custom report item run-time control is not supported.
StyleThe style properties for the custom report item.
AdornmentAn adornment window used for interactive editing of the control.
SiteThe ISite of the component.
DesignerVerbCollectionAn array of custom verbs for the control’s shortcut menu.

Public Methods

BeginEditActivates interactive editing for the control.
DoDefaultActionCalled in response to double-clicking or pressing Return on the control.
EndEditDeactivates interactive editing for the control.
GetServiceReturns an object which represents a service.
InitializeNewComponentCalled when a new custom report item is created.
InvalidateRepaints the entire surface of the control.
OnDragEnter

 OnDragDrop
Called when an object is dragged onto the control.
OnPaintCalled in response to the Paint event.

Microsoft.ReportDesigner.CustomReportItemAttribute

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.

Public Methods

CustomReportItemAttributeConstructs the CustomReportItemAttribute object.

Microsoft.ReportDesigner.LocalizedNameAttribute

This is the attribute used to specify display name to use for the custom report item designer.

Public Methods

LocalizedNameAttributeConstructs the LocalizedNameAttribute object.

Microsoft.ReportDesigner.Adornment

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.

Public Methods

OnShowCalled when the Adornment is activated.
OnHideCalled when the Adornment is deactivated.
PaintCalled in response to the Paint event.
OnDragEnter

 OnDragOver

 OnDragLeave

 OnDragDrop
Called when an object is dragged into the Adornment.

Microsoft.ReportDesigner.AdornerService

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.

Public Properties

AdornerWindowBoundsThe bounds of the Adorner window.
AdornerWindowRegionThe region of the Adorner window.
AdornerWindowGraphicsA graphics context for the Adorner window.

Public Methods

ComponentRectInDesignerFrameReturns the bounds of the component translated into designer frame coordinates.
InvalidateAdornerInvalidates the Adorner window.
PointToAdornerReturns a point in screen coordinates translated to Adorner window coordinates.

Microsoft.ReportDesigner.ExpressionEditor

This class can be used from your custom report item design-time control to invoke the Expression Editor.

Public Methods

EditValueInvokes the Expression Editor, initialized with the given object value.

Microsoft.ReportDesigner.IFieldsDataObject

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.

Public Properties

DataSetNameThe name of the dataset containing the fields to be dropped.
FieldsThe collection of fields (Microsoft.ReportDesigner.Field) to be dropped.

Report Definition Language (SSRS)
Creating a Custom Report Item Run-Time Component
Creating a Custom Report Item Design-Time Component

Community Additions

ADD
Show:
© 2016 Microsoft