runReport Operation

This operation executes a report on the server then returns the report’s results in the specified format. The client application is responsible for prompting users for values to pass to any input controls referenced by the report, as shown in the following sample request XML:

<request operationName="runReport" locale="en">
<argument name="RUN_OUTPUT_FORMAT">JRPRINT</argument>
<resourceDescriptor name="" wsType=""
uriString="/reports/samples/EmployeeAccounts"
isNew="false">
<label>null</label>
<parameter name="EmployeeID">emil_id</parameter>
<parameter name="TEST_LIST" isListItem="true">A &amp; L Powers Engineering, Inc</parameter>
<parameter name="TEST_LIST" isListItem="true">A &amp; U Jaramillo Telecom, Inc</parameter>
<parameter name="TEST_LIST" isListItem="true">A &amp; U Stalker Telecom, Inc</parameter>
</resourceDescriptor>
</request>

This example shows a parameter tag:

<!ELEMENT parameter (#PCDATA)>
<!ATTLIST parameter
name CDATA #REQUIRED
isListItem ( true | false ) false

In the example, name is the input control to set. If the input control is of type multi-select, the list of selected values is composed of a set of parameter tags that have the same names and have the isListItem attribute set to true, indicating that the parameter is part of a list.

The next example shows the getInputControlValues call for a cascading multi-select input control:

1. The IC_GET_QUERY_DATA argument gets the data from the data source.
2. The RU_REF_URI argument points to the report in which the input control is used.
3. Parameter tags under resourceDescriptor supply the parameters for the input control. The parameters’ specifics are derived from the ReportUnit resource properties ().
ResourceDescriptor rd = new ResourceDescriptor();
rd.setUriString("/reports/samples/Cascading_multi_select_report_files/                 Cascading_state_multi_select");<br />
rd.setResourceProperty(rd.PROP_QUERY_DATA, null);
ListItem li1 = new ListItem("Country_multi_select", "USA");
li1.setIsListItem(true);
rd.getParameters().add(li1);
ListItem li2 = new ListItem("Country_multi_select", "Mexico");
li2.setIsListItem(true);
rd.getParameters().add(li2);
java.util.List args = new java.util.ArrayList();
args.add(new Argument( Argument.IC_GET_QUERY_DATA, ""));
args.add(new Argument( Argument.RU_REF_URI,                       "/reports/samples/Cascading_multi_select_report"));<br />
ResourceDescriptor rd2 = wsclnt.get(rd, null, args);
if (rd2.getQueryData() != null) {
  List l = (List) rd2.getQueryData();
  for (Object dr : l) {
    InputControlQueryDataRow icdr = (InputControlQueryDataRow) dr;
    for (Object cv : icdr.getColumnValues()) {
      System.out.print(cv + " | ");
    }
    System.out.println();
  }
}

Note the following conventions for parameter values:

All parameter values are treated as strings; only number, string, and date/time values are allowed.
Numbers cannot include punctuation for the digit grouping symbol (thousands separator) and must use a period (.) as the decimal separator (if the relative parameter is not an integer).
Dates and date/times must be represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
Version: 
Feedback