cancel
Showing results for 
Search instead for 
Did you mean: 

How to get report status with web services?

Former Member
0 Kudos

Hi

I'm new to BO services and to BO itself.

For an application i need to execute a BO report via web services and to check afterwards, if the reports ran successfully, failed or are still executing.

How can I do this? Unfortunately I do not find a lot of useful information about this. The document I have is the "Unified Web Services Developer's Guide", but there I didn't find any solution.

I also have to say that I'm quite confused about all the different "products" here. And maybe it's me, but I find it very hard to find documentation about the BO web services....

I'm writing a .net application.

Thanks for any help!

Arjen

Accepted Solutions (1)

Accepted Solutions (1)

former_member208657
Active Contributor
0 Kudos

If you are using the Enterprise .NET Web Services SDK you can check out the kbase below. You'll need to be logged into the Service Marketplace to find this article.

1230411 - Retrieve scheduled job ID and job status using the SAP BusinessObjects Enterprise .NET Web Services SDK

Here is a snippet of the code to help you along.


private void CheckJobStatus(string jobCUID)
    {
        ResponseHolder boeResponseHolder;
        GetOptions boeGetOptions;
        InfoObjects boeInfoObjects;
        Pdf boePdfInstance;
        SchedulingInfo boeSchedulingInfo;
        string rptQuery;

        // Define the query for the report job.
        rptQuery = @"query://{select * from CI_INFOOBJECTS where SI_CUID='" + jobCUID.ToString().Trim() + "'}";

        // Get a handle to the BIPlatform service for querying
        boeConn.URL = boeSession.GetAssociatedServicesURL("biplatform")[0];
        BIPlatform boeBIPlatform = new BIPlatform(boeConn, boeSession.ConnectionState);

        // Set retrieval options for the queries. We will use the same options for all of the queries.
        boeGetOptions = new GetOptions();
        boeGetOptions.IncludeSecurity = false;

        // Query for the new instance by ID:
        boeResponseHolder = boeBIPlatform.Get(rptQuery, boeGetOptions);
        boeInfoObjects = boeResponseHolder.InfoObjects;
        boePdfInstance = (Pdf)boeInfoObjects.InfoObject[0];

        // Get schedule status
        boeSchedulingInfo = boePdfInstance.SchedulingInfo;

        // While the report is pending or running, print the status, wait, and then check the object status again
        while(boeSchedulingInfo.Status == ScheduleStatusEnum.PENDING || boeSchedulingInfo.Status == ScheduleStatusEnum.RUNNING)
        {
            ListBox1.Items.Add("[" + DateTime.Now.ToString("HH:mm:ss") + "] Schedule status: "
                + boeSchedulingInfo.Status.ToString());

            System.Threading.Thread.Sleep(3000); // Time value to wait, in milliseconds

            boeResponseHolder = boeBIPlatform.Get(rptQuery, boeGetOptions);
            boeInfoObjects = boeResponseHolder.InfoObjects;
            boePdfInstance = (Pdf)boeInfoObjects.InfoObject[0];
            boeSchedulingInfo = boePdfInstance.SchedulingInfo;
        }

        ListBox1.Items.Add("[" + DateTime.Now.ToString("HH:mm:ss") + "] Schedule status: "
            + boeSchedulingInfo.Status.ToString());
        ListBox1.Items.Add("[" + DateTime.Now.ToString("HH:mm:ss") + "] Schedule outcome: "
            + boeSchedulingInfo.Outcome.ToString());

        return;
    }

Former Member
0 Kudos

Thanks, that did the trick!

Arjen

Answers (1)

Answers (1)

ted_ueda
Employee
Employee
0 Kudos

Which version?

"Unified Web Services" refers to back when BusinessObjects 6.5 and Crystal Enterprise 10 was unified to BusinessObjects Enterprise XI, so it's old.

Sincerely,

Ted Ueda