Custom Report Item Class Libraries

New: 5 December 2005

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.

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

ms345260.note(en-US,SQL.90).gifNote:
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

Name

The name of the custom report item.

Type

The type of the custom report item.

CustomData

A CustomData class 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.

Public Methods

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.

OnDragEnter

OnDragDrop

Called when an object is dragged onto the control.

OnPaint

Called 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

CustomReportItemAttribute

Constructs 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

LocalizedNameAttribute

Constructs 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

OnShow

Called when the Adornment is activated.

OnHide

Called when the Adornment is deactivated.

Paint

Called 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

AdornerWindowBounds

The bounds of the Adorner window.

AdornerWindowRegion

The region of the Adorner window.

AdornerWindowGraphics

A graphics context for the Adorner window.

Public Methods

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.

Microsoft.ReportDesigner.ExpressionEditor

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

Public Methods

EditValue

Invokes 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

DataSetName

The name of the dataset containing the fields to be dropped.

Fields

The collection of fields (Microsoft.ReportDesigner.Field) to be dropped.

Microsoft.ReportDesigner.IReportItemConverter

Public Methods

Convert

Converts a native report item (provided as an XML string) into a custom report item (returned as an XML string).

The Microsoft.ReportDesigner namespace includes a number of wrapper classes that provide a managed object model for manipulating RDL elements. The following section lists the various types of managed RDL wrapper classes.

1:1 classes

The following classes are direct 1:1 wrappers for their corresponding RDL elements.

Class RDL Element(s)

Microsoft.ReportDesigner.CustomData

CustomData Element (RDL)

Microsoft.ReportDesigner.CustomProperty

CustomProperty Element (RDL)

Microsoft.ReportDesigner.DataCell

DataCell Element (RDL)

Microsoft.ReportDesigner.DataGrouping

DataGroupings Element (RDL)

Microsoft.ReportDesigner.DataRow

DataRow Element (RDL)

Microsoft.ReportDesigner.Expression

Using Expressions in Reporting Services

Microsoft.ReportDesigner.Field

Field Element (RDL)

Microsoft.ReportDesigner.Grouping

Grouping Element (RDL)

Microsoft.ReportDesigner.RptDataSet

DataSet Element (RDL)

Microsoft.ReportDesigner.SortBy

SortBy Element (RDL)

Microsoft.ReportDesigner.Sorting

Sorting Element (RDL)

Microsoft.ReportDesigner.Drawing.Style

Style Element (RDL)

Microsoft.ReportDesigner.Drawing.BorderColor

BorderColor Element (RDL)

Microsoft.ReportDesigner.Drawing.BorderStyle

BorderStyle Element (RDL)

Microsoft.ReportDesigner.Drawing.BorderWidth

BorderWidth Element (RDL)

Collection classes

The following classes encapsulate parent elements with repeating RDL elements, which are returned as a List object.

Class RDL Element(s)

Microsoft.ReportDesigner.DataColumnGroupings

DataColumnGroupings Element (RDL)

Microsoft.ReportDesigner.DataRowGroupings

DataRowGroupings Element (RDL)

Microsoft.ReportDesigner.FieldCollection

Fields Element (RDL)

Microsoft.ReportDesigner.GroupExpressions

GroupExpressions Element (RDL)

Microsoft.ReportDesigner.RptDataSets

DataSets Element (RDL)

Encapsulation classes

These classes are composite encapsulation classes that group multiple related RDL elements into one class.

Class RDL Element(s)

Microsoft.ReportDesigner.ImageSource

Image Element (RDL) or BackgroundImage Element (RDL)

Microsoft.ReportDesigner.Drawing.ReportFont

Encapsulates all RDL elements related to fonts: FontFamily Element (RDL), FontSize Element (RDL), FontStyle Element (RDL), FontWeight Element (RDL).

Microsoft.ReportDesigner.Drawing.ReportPadding

Encapsulates all RDL elements related to report padding: PaddingBottom Element (RDL), PaddingLeft Element (RDL), PaddingRight Element (RDL), PaddingTop Element (RDL).

Enumerator-style classes

The following classes return values that are either expressions or an enumerator value.

Class RDL Element(s)

Microsoft.ReportDesigner.Drawing.CalendarString

Corresponds to the value of a Calendar Element (RDL).

Microsoft.ReportDesigner.Filter.Operators

Corresponds to the value of a filter Operator Element (RDL).

Microsoft.ReportDesigner.Sorting.Direction

Corresponds to the value of a sort SortBy Element (RDL).

Microsoft.ReportDesigner.Drawing.StyleUnit

Corresponds to the value of any RDL element that takes a size value.

Microsoft.ReportDesigner.Drawing.ReportColor

Corresponds to the value of any RDL element that takes a color value.

Community Additions

ADD
Show: