skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Report

Represents the base class for any report in Telerik Reporting.

Inheritance
System.Object
ReportObject
ReportItemBase
Report
Inherited Members
ReportItemBase.Dispose()
ReportItemBase.Dispose(Boolean)
ReportItemBase.ToString()
ReportItemBase.Contains(ReportItemBase)
ReportItemBase.OnItemValidate(ReportItemBase)
ReportItemBase.ClearGlobalDependencies()
ReportItemBase.Container
ReportItemBase.DesignMode
ReportItemBase.Site
ReportItemBase.Name
ReportItemBase.Visible
ReportItemBase.StyleName
ReportItemBase.Style
ReportItemBase.Items
ReportItemBase.Parent
ReportItemBase.Report
ReportItemBase.ConditionalFormatting
ReportItemBase.Bookmark
ReportItemBase.BookmarkId
ReportItemBase.DocumentMapText
ReportItemBase.TocText
ReportItemBase.Action
ReportItemBase.Bindings
ReportItemBase.ToolTip
ReportItemBase.AccessibleDescription
ReportItemBase.AccessibleRole
ReportItemBase.ItemDataBinding
ReportItemBase.ItemDataBound
ReportItemBase.Disposed
ReportObject.ToString(String[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll

Syntax

public class Report : ReportItemBase, IReportItem, IToggleVisibilityTarget, IActionTarget, IDesignTimeStyleEditable, IDesignTimeSelectable, IDataItem, IDataFlow, IDataSourceContainer, ISupportInitialize, IReportDocument, IComponent, IDisposable, INamedObject, ISupportsNeedDataSource
Remarks

All reports created with Telerik Reporting inherit from the Report class. The Report comprises of one or more report sections which contain report items.

Constructors

Report()

Initializes a new instance of the Report class with default settings.

Declaration
public Report()

Properties

Culture

Gets or sets the culture information associated with the report.

Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo

A System.Globalization.CultureInfo representing the culture supported by the Report.

DataSource

Gets or sets the data source that the Report is displaying data for.

Declaration
public object DataSource { get; set; }
Property Value
System.Object

An object that functions as a data source.

Implements
IDataSourceContainer.DataSource
Remarks

Telerik Reporting includes dedicated data source components that enable retrieving and feeding all data items from various sources. See all the available data source components at: https://docs.telerik.com/reporting/designing-reports/connecting-to-data/data-source-components/overview

For convenience, all the objects applicable to the DataSource property can be directly assigned to this DataSource property. At runtime, the report engine will wrap them in an ObjectDataSource to resolve the actual data.

DocumentName

Gets or sets a System.String representing the name of the report document.

Declaration
public string DocumentName { get; set; }
Property Value
System.String

A System.String representing the document name. The default value is the name of the Report this property belongs to.

Implements
IReportDocument.DocumentName
Remarks

The value of this property is used to suggest a file name when exporting a report to one of the available export formats. This property value is not used when exporting from the standalone report designer. The report filename will be used instead.

Also used to specify the report name (root node) in the document map.

A System.String that starts with "=" is interpreted as an expression to evaluate the document name; otherwise it is interpreted as a literal string. The expression cannot contain any data fields.

ExternalStyles

Declaration
[Obsolete("Please use ExternalStyleSheets property instead.")]
public ICollection<string> ExternalStyles { get; }
Property Value
System.Collections.Generic.ICollection<System.String>

ExternalStyleSheets

Gets the collection of ExternalStyleSheets for the report.

Declaration
public ExternalStyleSheetCollection ExternalStyleSheets { get; }
Property Value
ExternalStyleSheetCollection

Filters

Gets a FilterCollection that defines the filter expression(s) for the Report

Declaration
public FilterCollection Filters { get; }
Property Value
FilterCollection

A FilterCollection that contains the Filter objects for the Report

Remarks

Filter expressions limit the data that is displayed to the user after the data is retrieved from the data source.

Groups

Gets a GroupCollection that defines the groups for the Report

Declaration
public GroupCollection Groups { get; }
Property Value
GroupCollection

A GroupCollection that contains the Group objects for the Report

Remarks

Grouping is used to gather all rows that match certain grouping criteria together. Grouping criteria is defined by adding one or more Grouping objects to a Group.

PageNumberingStyle

Gets or sets a PageNumberingStyle for the Report.

Declaration
public PageNumberingStyle PageNumberingStyle { get; set; }
Property Value
PageNumberingStyle

A PageNumberingStyle representing the page numbering style. The default value is Continue

Remarks

When the report is part of a ReportBook, use this property to indicate whether the page numbering / count should start from 1 or continue from the last page number / count of the previous report.

PageSettings

Gets or sets the page settings for the Report .

Declaration
public PageSettings PageSettings { get; set; }
Property Value
PageSettings

The page settings for the Report.

Implements
IReportDocument.PageSettings

ReportEngineSettings

Gets an instance of ReportEngineSettings containing report-specific settings that will be respected by the reporting engine during the processing and rendering stage of the report lifecycle.

Declaration
public ReportEngineSettings ReportEngineSettings { get; }
Property Value
ReportEngineSettings

Examples

This example illustrates how to set the caching of the report definition properties of a report.

var report1 = new Report1();

// Set the CacheDefinitionProperties to CacheDefinitionProperties.No to allow modifying the report definition at runtime.
// Please note that this approach might cause inpredictable behavior and will decrease the processing performance.
report1.ReportEngineSettings.CacheDefinitionProperties = Telerik.Reporting.CacheDefinitionProperties.No;
Dim report1 As New Report1()

'Set the CacheDefinitionProperties to CacheDefinitionProperties.No to allow modifying the report definition at runtime.
'Please note that this approach might cause inpredictable behavior And will decrease the processing performance.
report1.ReportEngineSettings.CacheDefinitionProperties = Telerik.Reporting.CacheDefinitionProperties.No

ReportParameters

Gets a collection of report parameters.

Declaration
public ReportParameterCollection ReportParameters { get; }
Property Value
ReportParameterCollection

RuntimeSettings

Gets a collection containing report-specific export rendering settings.

Declaration
public RenderingSettingsCollection RuntimeSettings { get; }
Property Value
RenderingSettingsCollection

Remarks

When the report is part of a ReportBook this property will be respected for the first report in the book only.

Examples

This example illustrates how to set the PDF Runtime settings of a report.

var pdfSettings = new Telerik.Reporting.RenderingSettings() { Name = "PDF" };
pdfSettings.Parameters.Add(new Telerik.Reporting.Parameter() { Name = "DocumentAuthor", Value = "YourName" });
report1.RuntimeSettings.Add(pdfSettings);
Dim pdfSettings = New Telerik.Reporting.RenderingSettings() With {
.Name = "PDF"
 }
pdfSettings.Parameters.Add(New Telerik.Reporting.Parameter() With {
.Name = "DocumentAuthor",
.Value = "YourName"
 })
report1.RuntimeSettings.Add(pdfSettings)

SkipBlankPages

Gets or sets a value indicating whether pages without significant content should be output.

Declaration
public bool SkipBlankPages { get; set; }
Property Value
System.Boolean

A boolean representing the SkipBlankPages behavior. The default value is true.

Remarks

When the report is part of a ReportBook this property will be respected for the corresponding report in the book.

Sorting

Declaration
[Obsolete("Please use Sortings property instead.")]
public SortingCollection Sorting { get; }
Property Value
SortingCollection

Sortings

Gets a SortingCollection that defines the sort column(s), and their type and order for the Report

Declaration
public SortingCollection Sortings { get; }
Property Value
SortingCollection

A SortingCollection that contains the Sorting objects for the Report

Remarks

Sort expressions sort the data that is displayed to the user after the data is retrieved from the data source.

StyleSheet

Gets the StyleSheet associated with the report.

Declaration
public StyleSheet StyleSheet { get; }
Property Value
StyleSheet

A StyleSheet object representing a collection of style rules.

Remarks

The StyleSheet property of a report can be used to define various types of styles for use by the report items.

UnitOfMeasure

Gets or sets the default unit of measure for the report.

Declaration
public UnitType UnitOfMeasure { get; set; }
Property Value
UnitType

An UnitType representing the default unit of measure for the report.

Remarks

All newly created report items will have their locations, sizes, etc. in this UnitType.

Width

Gets or sets the width of the report.

Declaration
public Unit Width { get; set; }
Property Value
Unit

The width of the report in Units.

Methods

GetDataSources()

Gets all IDataSource instances available in the report definition, regardless if they are referenced by a data item or a report parameter.

Declaration
public IEnumerable<IDataSource> GetDataSources()
Returns
System.Collections.Generic.IEnumerable<IDataSource>

A read-only collection of IDataSource instances.

OnError(Object, ErrorEventArgs)

Declaration
protected virtual void OnError(object sender, ErrorEventArgs e)
Parameters
System.Object sender

ErrorEventArgs e

OnNeedDataSource(Object, EventArgs)

Declaration
protected virtual void OnNeedDataSource(object sender, EventArgs e)
Parameters
System.Object sender

System.EventArgs e

Events

Error

Declaration
public event ErrorEventHandler Error
Event Type
ErrorEventHandler

NeedDataSource

Occurs when the processing of the report processing instance (i.e., Report instance) begins and this instance has no DataSource property set.

Declaration
public event EventHandler NeedDataSource
Event Type
System.EventHandler

Remarks

The event is hooked on the definition Report instance, but the sender object in the event handler is the processing Report instance. The processing instance of the report inherits its DataSource from the definition instance, but if neither has DataSource set, this event is raised.

Examples

The following example demonstrates how to implement a NeedDataSource event handler:

void report_NeedDataSource(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.Report processingReport = (Telerik.Reporting.Processing.Report)sender;
    object processingParameterValue = processingReport.Parameters["parameter1"].Value;
    processingReport.DataSource = GetData(processingParameterValue);
}

static object GetData(object value)
{
    // Implement your custom data retrieval logic instead
    return new string[] { "Sofia", "London", "Tokyo" };
}
Private Sub report_NeedDataSource(sender As Object, e As EventArgs)
    Dim processingReport As Telerik.Reporting.Processing.Report = DirectCast(sender, Telerik.Reporting.Processing.Report)
    Dim processingParameterValue As Object = processingReport.Parameters("parameter1").Value
    processingReport.DataSource = GetData(processingParameterValue)
End Sub

Private Shared Function GetData(value As Object) As Object
    ' Implement your custom data retrieval logic instead
    Return New String() {"Sofia", "London", "Tokyo"}
End Function

Operators

Implicit(Report to ReportSource)

Declaration
[Obsolete("The implicit Telerik.Reporting.Report to Telerik.Reporting.ReportSource conversion is now obsolete. Please use a Telerik.Reporting.InstanceReportSource object instead. For more information, please visit: https://www.telerik.com/support/kb/reporting/general/q2-2012-api-changes-reportsources.aspx#reportprocessor.")]
public static implicit operator ReportSource(Report report)
Parameters
Report report

Returns
ReportSource

Explicit Interface Implementations

IDataFlow.Filters

Declaration
IList<Filter> IDataFlow.Filters { get; }
Returns
System.Collections.Generic.IList<Filter>

Implements
IDataFlow.Filters

IDataFlow.Sortings

Declaration
IList<Sorting> IDataFlow.Sortings { get; }
Returns
System.Collections.Generic.IList<Sorting>

Implements
IDataFlow.Sortings

IReportDocument.ReportParameters

Declaration
[Obsolete("Please use Report.ReportParameters / ReportSource.Parameters instead.")]
IEnumerable<IReportParameter> IReportDocument.ReportParameters { get; }
Returns
System.Collections.Generic.IEnumerable<IReportParameter>

Implements
IReportDocument.ReportParameters

IReportDocument.Reports

Declaration
[Obsolete("Please use the report directly or the IReportDocument.ReportSources property instead.")]
IEnumerable<Report> IReportDocument.Reports { get; }
Returns
System.Collections.Generic.IEnumerable<Report>

Implements
IReportDocument.Reports

IReportDocument.ReportSources

Gets the report sources contained in this report document. The Report implementation returns a new InstanceReportSource containing the current Report object

Declaration
IEnumerable<ReportSource> IReportDocument.ReportSources { get; }
Returns
System.Collections.Generic.IEnumerable<ReportSource>

Implements
IReportDocument.ReportSources

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.