createReport() Method

In ReportService, use the createReport() method to create a report in the catalog.

The method enables you to set the path to the data model and supply template files and translation (XLIFF) files to the report definition.

Signature

String createReport(String reportName, String folderAbsolutePathURL, String dataModelURL, String templateFileName, byte[] templateData, String XLIFFFileName, byte[] XLIFFData, boolean updateFlag, String userID, String password);

Parameters for createReport() Method

Parameter Description

String reportName

The report name to create with the suffix ".xdo". For example, "myreport.xdo".

String folderAbsolutePathURL

The path to the folder in which to place the created report. For example: xmlp/Reports/financials

String dataModelURL

The path to the data model that will be used as the data source for this report. For example: xmlp/Reports/financials/Data Models/my data model.xdm

String templateFileName

The file name of the template to add the report definition.

byte[] templateData

The template file.

String XLIFFFileName

The file name of the XLIFF file. You must append the locale to the XLIFF file name as follows:

template_<language code>_<country code>.xlf

where

<language_code> is the two-letter ISO 639 language code

<country_code> is the two-letter ISO 639 language code

For example: template_en_us.xlf

byte[] XLIFFData

The XLIFF file.

boolean updateFlag

If true, overwrites existing report. If false, throws error if the report exists.

String userID

Specifies the user name.

String password

Specifies the password for the user name.