Exago .NET API Documentation
Create Method
Example 
WebReports.Api.Reports Namespace > ReportObjectFactory Class : Create Method
The type of report to create, one of the wrReportType Enumeration members.
The value of the ReportObject's IsNew Property when this report is created. For newly created reports that have not yet been saved to the repository, this value should be True.
Create a new report object, it has not yet been saved into the report repository. The created report object is made the active report object.
Syntax
public ReportObject Create( 
   wrReportType reportType,
   System.bool isNew
)

Parameters

reportType
The type of report to create, one of the wrReportType Enumeration members.
isNew
The value of the ReportObject's IsNew Property when this report is created. For newly created reports that have not yet been saved to the repository, this value should be True.

Return Value

A ReportObject object that represents the new report.
Example
Create a new Advanced Report in My Reports\API Created Report. Include a simple report description
Report myNewReport = (Report)api.ReportObjectFactory.Create(wrReportType.Advanced, true);
myNewReport.Name = "API Created Report";
myNewReport.Description = "This report was created in the .NET API";
myNewReport.FolderName = "My Reports";

//Add at least one column to a report to prevent errors in the Designer.
myNewReport.Columns.Add(new Column(api.PageInfo));

api.ReportObjectFactory.SaveToRepository(myNewReport);
See Also

Reference

ReportObjectFactory Class
ReportObjectFactory Members