Back to Devexpress

ReportGenerator.GenerateReport(BaseView) Method

xtrareports-devexpress-dot-xtrareports-dot-reportgeneration-dot-reportgenerator-dot-generatereport-x28-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-x29.md

latest3.2 KB
Original Source

ReportGenerator.GenerateReport(BaseView) Method

Generates a new report using the specified grid view.

Namespace : DevExpress.XtraReports.ReportGeneration

Assembly : DevExpress.XtraReports.v25.2.Extensions.dll

NuGet Package : DevExpress.Win.Reporting

Declaration

csharp
public static XtraReport GenerateReport(
    BaseView view
)
vb
Public Shared Function GenerateReport(
    view As BaseView
) As XtraReport

Parameters

NameTypeDescription
viewBaseView

A BaseView descendant.

|

Returns

TypeDescription
XtraReport

An XtraReport object.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GenerateReport(BaseView) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-reporting-create-grid-based-report/CS/ConvertGridToReportExample/Form1.cs#L87

csharp
{
    XtraReport report = ReportGenerator.GenerateReport(gridView);
    ReportDesignTool designTool = new ReportDesignTool(report);

winforms-reporting-create-grid-based-report/VB/ConvertGridToReportExample/Form1.vb#L73

vb
Private Sub btnReportGeneratorDesigner_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReportGeneratorDesigner.ItemClick
    Dim report As XtraReport = ReportGenerator.GenerateReport(gridView)
    Dim designTool As New ReportDesignTool(report)

See Also

ReportGenerator Class

ReportGenerator Members

DevExpress.XtraReports.ReportGeneration Namespace