xtrareports-devexpress-dot-xtrareports-dot-ui-79e5ca9d.md
A DevExpress report.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[DXLicenseReporting]
public class XtraReport :
XtraReportBase,
ISupportInitialize,
IServiceProvider,
IServiceContainer,
IReport,
IDocumentSource,
ILink,
IComponent,
IDisposable,
IExtensionsProvider,
IParameterSupplier,
IParameterSupplierBase,
IRootXmlObject,
IReportEvents
<DXLicenseReporting>
Public Class XtraReport
Inherits XtraReportBase
Implements ISupportInitialize,
IServiceProvider,
IServiceContainer,
IReport,
IDocumentSource,
ILink,
IComponent,
IDisposable,
IExtensionsProvider,
IParameterSupplier,
IParameterSupplierBase,
IRootXmlObject,
IReportEvents
The following members return XtraReport objects:
Show 24 links
The following members return XtraReport objects:
Show 50 links
For general information on DevExpress Reporting, refer to the following topic: Get Started with DevExpress Reporting.
You can use the Visual Studio Report Designer to create reports for most common scenarios. You can also create and customize reports in code. See the following documents for more information on both methods:
DevExpress Reporting ships with the Document Viewer and the End-User Report Designer components for the following Microsoft platforms:
Each component includes an API that accepts an XtraReport class instance. You can create an instance of your report in code and use this API to pass your report to the Document Viewer or open it in the End-User Report Designer.
The following example displays a report in the WinForms Document Viewer control:
using DevExpress.XtraReports.UI;
//...
ReportPrintTool printTool = new ReportPrintTool(new XtraReport1());
printTool.ShowRibbonPreview();
Imports DevExpress.XtraReports.UI
'...
Private printTool As New ReportPrintTool(New XtraReport1())
printTool.ShowRibbonPreview()
The example below demonstrates how to open a report in the ASP.NET Core Document Viewer:
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("1000px")
.Bind(new XtraReport1());
@viewerRender.RenderHtml()
}
You can find a list of all available platforms and more information on each of them in the following documentation section: Integrate a Report into the User Interface.
The Report Designer serializes your report while you create it in Visual Studio. This serialization mechanism allows you to create an instance of your report in code. You can then export or print the created report without showing it in the Document Viewer. The latter also applies to reports created in code from scratch.
The following example creates a report instance and exports it to PDF:
using System;
//..
var report = new XtraReport1();
report.ExportToPdf(Environment.GetFolderPath(
Environment.SpecialFolder.UserProfile) + @"\Downloads\Report1.pdf"
);
Imports System
'..
Private report = New XtraReport1()
report.ExportToPdf(Environment.GetFolderPath(
Environment.SpecialFolder.UserProfile) & "\Downloads\Report1.pdf"
)
Refer to the following document for more information: Print and Export Reports without a Preview.
Object MarshalByRefObject Component XRControl Band XtraReportBase XtraReport XtraSchedulerReport
Show 12 items
ShowDesignerDialog(UserLookAndFeel)
ShowDesigner(UserLookAndFeel, DesignDockPanelType)
ShowDesignerDialog(UserLookAndFeel, DesignDockPanelType)
ShowRibbonDesigner(UserLookAndFeel)
ShowRibbonDesignerDialog(UserLookAndFeel)
ShowRibbonDesigner(UserLookAndFeel, DesignDockPanelType)
ShowRibbonDesignerDialog(UserLookAndFeel, DesignDockPanelType)
See Also