Is there a way to retrieve output by eventID

Technote (FAQ)


Question

User A schedules a report X to run asynchronously and a few seconds later user B schedules the same report but with different parameters.

Using the runAt method to run the reports at a later time, two event IDs are created, one for user A and one for user B. How can the SDK be used to get the saved report output for user A based on her event ID and the saved report output for user B based on his eventID?

Answer

The key to linking the history with the resultant reportVersion and the output can be found in the history's child historyDetailReportService.

Here are some extracts from the SDK Developer Guide:

history
Provides information about the running of a task.
The object that was run is the parent of the bibus » history
...
eventID
Specifies the unique ID for the task that created this history object.
This property
o is of type string is encoded as type tns:stringProp
o must contain exactly 45 characters
o must contain exactly 45 ASCII letters or digits; the letters can be uppercase or lowercase
o is searchable
...

Therefore you can find the history for a specific eventID using a searchpath like this:

<object_path>/history[@eventID='<eventID from the response>']
or alternatively
//history[@eventID='<eventID from the response>']

Once you have the history for the event, retrieve the history's child object of type historyDetailReportService

historyDetailReportService
Provides the location of the report output created in the content store during the running of a report.
Instances of this class are created by the reportService and batchReportService.
...
Properties
This class has the following properties.
output
Contains a reference to the reportVersion object produced during the run.
This property refers to other objects in the content store using an id-based search path
has items that must be of class reportVersion
Class: baseClassArrayProp
...

The output property contains a searchPath which will direct you to the
correct reportVersion for that eventID. The report output(s) are child
objects of the reportVersion.

The document in the Related information section below shows how to use a HistoryDetailReportService.

For more details on Search Path Syntax, see the section in the Developer Guide.

Related information

HistoryDetailReportService processing

Rate this page:

(0 users)Average rating

Document information


More support for:

Cognos Business Intelligence

Software version:

10.1, 10.1.1, 10.2, 10.2.1

Operating system(s):

AIX, HP Itanium, HP-UX, Linux, Solaris, Windows

Reference #:

1651993

Modified date:

2013-10-09

Translate my page

Machine Translation

Content navigation