Udostępnij za pośrednictwem


Code Element (RDL)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Contains definitions for custom functions to be used in the report.

Datatype Characteristics

Characteristic Description

Data type and length

String

Default value

None

Element Relationships

Relationship Element

Parent elements

Report Element (RDL)

Child elements

None

Remarks

Functions contained within the Code element must be written in Microsoft Visual Basic .NET and must be instance methods. For information about writing custom code and using the functions contained within the Code element in a report, see Using Custom Code References in Expressions (Reporting Services).

The code from the Code element of a report and from your custom assemblies is instantiated into a Code object when the report is run. In some cases, you may need to override the default OnInit method for this object to initialize your custom classes with values from the global collections in the report. For information about initializing the Code object using OnInit, see Initializing Custom Assembly Objects.

See Also

Reference

Report Definition Language XML Schema
Report Definition XML Elements

Concepts

Report Definition Language Data Types

Other Resources

Development (Reporting Services)

Help and Information

Getting SQL Server 2008 Assistance