[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Design.Designer.NewReport

NewReport Method

NewReport()

Initializes the designer with a new report layout of the default type, which is Section. This method serves as a convenience wrapper for creating a new Section report.

Declaration
public void NewReport()

NewReport(DesignerReportType)

Initializes the designer with a new report layout of the specified type. This method simplifies the process of creating a new report by allowing the caller to specify the type of report they wish to create, such as Section or Page.

Declaration
public void NewReport(DesignerReportType type)
Parameters
Type Name Description
DesignerReportType type

Specifies the type of the new report to be created. The type is defined by the DesignerReportType enumeration, which includes options for Section and Page report types among others.

Remarks

This method is part of the public API of the designer and can be used to programmatically initiate the creation of a new report within the designer environment. It is particularly useful in scenarios where the type of report to be created is determined at runtime based on user input or other dynamic conditions.

Examples

Creates new empty report of specific type and initializes the designer with it.

//Assume that '_designer' is a Designer object
_designer.NewReport(DesignerReportType.Rdl);

NewReport(DesignerReportType, bool)

Initializes the designer with a new report layout of the specified type and, if requested, launches the Data Source Dialog. This method facilitates the creation of a new report by allowing the specification of the report type (e.g., Section, Page) and provides an option to immediately launch the Data Source Dialog, which assists in setting up data connections and queries for the report.

Declaration
public void NewReport(DesignerReportType type, bool launchDataSourceWizard)
Parameters
Type Name Description
DesignerReportType type

The type of the new report to be created, as defined by the DesignerReportType enumeration.

bool launchDataSourceWizard

If set to true, the Data Source Dialog is launched after the report is initialized; otherwise, it is not launched.

Remarks

The Data Source Dialog is a tool that simplifies the process of connecting a report to data by guiding the user through the steps required to define a data source and create queries. This method is particularly useful when creating a new report that requires immediate data binding.