18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

String specifying the operation to perform and the Report worksheet to output, using the syntax<br />

"Operation:Report worksheet", where…<br />

Operation is either Disk (saves data file to hard disk), Prn (sends report to default printer), or<br />

Pdf (generates a PDF file of the report); and<br />

Report worksheet is the name of the Report worksheet file ( *.rep ) to output.<br />

optNumOrientation<br />

Set the paper orientation as follows: 0 (default) is Portrait, 1 is Landscape. This parameter is<br />

ignored if the Operation is other than Prn.<br />

Note: Some features of this function are not supported when running the project on a Windows<br />

Embedded device: it cannot generate PDFs; it cannot change paper orientation using the<br />

optNumOrientation parameter; and it does not support Report worksheets in RTF format.<br />

Returned value<br />

Value<br />

Description<br />

0 Success<br />

1 strFunction is configured with a numeric value (invalid)<br />

2 strFunction does not contain ":" (invalid)<br />

3 strFunction contains an invalid output type before the ":"<br />

4 Background Task is not running (see Tip below)<br />

5 Disk error (e.g., disk full, read-only file cannot be overwritten, or invalid path)<br />

6 Specifed Report worksheet does not exist<br />

Tip: The Background Task must be running in order to execute this function. Otherwise, the<br />

operation will not be executed and the function will return the value 4 indicating error. For more<br />

information, see Execution Tasks.<br />

Examples<br />

Tag Name<br />

Expression<br />

Report( "Disk:Report1.rep" )<br />

Report( "Prn:Report2.rep", 0 )<br />

Report( "Prn:Report3.rep", 1 )<br />

Report( "Pdf:Report1.rep" )<br />

RunGlobalProcedureAsync<br />

This function executes a global procedure asynchronously, in its own thread, so that it does not slow down<br />

or interfere with other running scripts. The procedure is run on the project server, but it can be called by any<br />

local or remote client.<br />

Function Group Execution Windows Embedded Thin Client<br />

RunGlobalProcedureAsync<br />

Module Activity Asynchronous Supported Supported Not supported; see note<br />

<strong>InduSoft</strong> Web Studio Page 609

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!