report
Methods
exportToBytes
exportToBytes(
pReportName,pCondition,pExportFormat,pWhereOrder,pPrompts,pColumnNames,pData,pLocale):string
Exports a report on the server; the result is a byte array.
Parameters
string | number | booleanThe report to be exported.
anyThe condition (sql) that specifies the records to be filtered. Can also be entered in the following format: [sql, [value1, value2, valuen]].
numberThe export format. See report.EXPORT_*.
string | number | booleanCan only be used in the client context, i.e. not in server processes. Defines which conditions of the linked frame should be evaluated. Possible values are "o", "w", "wo"/"ow", "". "o": Only the ORDER clause of the frame will be evaluated. "w": Only the WHERE clause of the frame will be evaluated. "wo" / "ow": Both the WHERE clause and the ORDER clause will be evaluated. "": Neither the ORDER clause nor the WHERE clause will be evaluated.
anyParameters are passed to the report; 'null' if no parameters are passed.
string[]If the report is static, specify the column names here. Otherwise 'null'.
string[][]The data, as a two-dimensional array (in case of a static report). Otherwise 'null'.
string | number | booleanThe locale as a string.
Returns
stringThe exported report, as a Base64-encoded byte[].
Throws
May throw an exception.
Example
var columnNames = ["QUANTITY", "YEAR", "MONTH"];
var data = db.table("select sum(ORDERITEM.QUANTITY), " + yearfromdate("SALESORDER.ORDERDATE") + " , "+ monthfromdate("SALESORDER.ORDERDATE")
+ " from ORDERITEM join SALESORDER on ORDERITEM.SALESORDER_ID = SALESORDERID group by " + yearfromdate("SALESORDER.ORDERDATE") + ", "+ monthfromdate("SALESORDER.ORDERDATE"));
var params = {};
var imgData = getMyASYS_ICONSdata();
params["myAddr"] = imgData[0];
params["adito.image.myLogo"] = imgData[1];
if ( pExport )
{
var doc = [];
doc[0] = "Auswertung.pdf"
doc[1] = report.exportToBytes("RPTJ_QUANTITY_3Y", null, report.REPORT_EXPORT_PDF, null, params, columnNames, data, null);
return doc;
}
exportToFile
exportToFile(
pReportName,pCondition,pExportFormat,pExportFile,pWhereOrder,pPrompts,pColumnNames,pData,pWaitFor,pIdentifier,pLocale):void
Exports a report that exists on the server as a file.
Parameters
string | number | booleanThe report to be exported.
anyThe condition (sql) that specifies the records to be filtered. Can also be entered in the following format: [sql, [value1, value2, valuen]].
numberThe export format. See report.EXPORT_*.
string | number | booleanThe file name of the export file.
string | number | booleanCan only be used in the client context, i.e. not in server processes. Defines which conditions of the linked frame should be evaluated. Possible values are "o", "w", "wo"/"ow", "". "o": Only the ORDER clause of the frame will be evaluated. "w": Only the WHERE clause of the frame will be evaluated. "wo" / "ow": Both the WHERE clause and the ORDER clause will be evaluated. "": Neither the ORDER clause nor the WHERE clause will be evaluated.
anyParameters are passed to the report; 'null' if no parameters are passed.
string[]If the report is static, specify the column names here. Otherwise 'null'.
string[][]The data, as a two-dimensional array (in case of a static report). Otherwise 'null'.
boolean'true' waits until the report has been exported; 'false' performs an export in the background.
string | number | booleanAn identifier of the background export.
string | number | booleanThe locale as a string.
Returns
voidThrows
May throw an exception.
Example
var params = {};
var imgData = getMyASYS_ICONSdata();
params["myAddr"] = imgData[0];
params["adito.image.myLogo"] = imgData[1];
report.exportToFile("RPTJ_ORGLIST", null, report.REPORT_EXPORT_TXT, "H:\\orglist.txt", null, params, null, null, false, "orglist", null);
Properties
REPORT_EXPORT_BMP
numberExport file format: BMP
REPORT_EXPORT_CSV
numberExport file format: CVS
REPORT_EXPORT_DOCX
numberExport file format: DOCX
REPORT_EXPORT_GIF
numberExport file format: GIF
REPORT_EXPORT_HTML
numberExport file format: HTML
REPORT_EXPORT_JPG
numberExport file format: JPG
REPORT_EXPORT_ODS
numberExport file format: ODS
REPORT_EXPORT_ODT
numberExport file format: ODT
REPORT_EXPORT_PDF
numberExport file format: PDF
REPORT_EXPORT_PNG
numberExport file format: PNG
REPORT_EXPORT_PPTX
numberExport file format: PPTX
REPORT_EXPORT_PS
numberExport file format: PS
REPORT_EXPORT_PS2
numberExport file format: PS2
REPORT_EXPORT_PS3
numberExport file format: PS3
REPORT_EXPORT_RTF
numberExport file format: RTF
REPORT_EXPORT_SVG
numberExport file format: SVG
REPORT_EXPORT_TXT
numberExport file format: TXT
REPORT_EXPORT_XLS
numberExport file format: XLS
REPORT_EXPORT_XLSX
numberExport file format: XLSX
REPORT_EXPORT_XML
numberExport file format: XML
REPORT_PARAM_CONDITION
stringConstant for report parameter names: condition
REPORT_PARAM_DATASOURCE_PREFIX
stringConstant for report parameter names: prefix for the data source
REPORT_PARAM_IMAGE_PREFIX
stringConstant for report parameter names: prefix for the image
REPORT_PARAM_ORDER
stringConstant for report parameter names: ORDER BY