This section lists all the methods in the iHub API in alphabetical order. Each method entry includes a general description of the method, the JavaScript and Java syntaxes, the result the method returns, and examples.
appendToJobStatus( )
Appends a specified string to the status of the current job. iHub writes status messages for each report-generation job.
JavaScript syntax
appendToJobStatus(statusString)
Java syntax
public void appendToJobStatus( String statusString )
Argument
statusString
The string to add to the job status.
Usage
Provide information for debugging purposes. For example, to verify that an event handler is executed, write a message indicating that the event method is called.
JavaScript example
reportContext.getAppContext().get("ServerContext") .appendToJobStatus("This message appears when beforeFactory is called.\n");
Use in cases when an application requires different code for different browsers. The browser information is available only when the report is rendered, so use getUserAgentString( ) in a report element’s onRender event.
Returns
The browser type in String format. For Internet Explorer, for example, getUserAgentString( ) might return a string, such as:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; MS-RTC LM 8)
scontext.setHeadline("Sales Report for " + region);
setVersionName( )
Sets the version name of a generated report.
JavaScript syntax
setVersionName(versionName)
Java syntax
public void setVersionName( String versionName )
Argument
versionName
A string that represents the report’s version name.
Usage
Use to specify a version name that includes dynamic data, such as the contents of a report, the value of a report parameter, or the report-generation date.
JavaScript example
reportContext.getAppContext().get("ServerContext") .setVersionName("Version " + new Date());