createReport

createReport(reportName:          String;
             folderPath:          String;
             viewName:            String;
             rootCollectionAlias: String;
             copyFromReportName:  String): Integer;

The createReport method of the JadeReportWriterManager class creates a new empty report with the specified parameter values listed in the following table.

Parameter Description
reportName Name of the report to be created
folderPath Existing folder in which the report is to be located and which can be accessed by the current user
viewName Name of an existing reporting view for the report that can be accessed by the current user
rootCollectionAlias Existing reporting collection alias for the reporting view
copyFromReportName Optional name of an existing report that can be accessed by the current user and from which the new report is copied

You must specify a value for all parameters other than the copyFromReportName parameter. The parameter values are checked before creating the report.

If the report is created successfully, this method returns a zero (0) value. If the report creation fails, the return value indicates the error status, which depends on the parameter value that caused the error. These return error values are listed in the following table.

Failure Return Value Meaning
1 The report name contains spaces or the length is greater than 100 characters
2 A report already exists with the name specified in the reportName parameter
3 The folder path is invalid or it cannot be accessed by the current user
4 The reporting view name does not exist or it cannot be accessed by the current user
5 The reporting collection alias does not exist for the reporting view
6 The base report does not exist or it cannot be accessed by the current user