cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a table row count from a BO Web service

0 Kudos

Hi,

How to get a table row count from the report using business objects web service.

Here is my complete requirement :

- I will schedule a report using publication.

- After the schedule gets success. Through BO Restful web service, I want to get the row count from a particular report/Data provider that run.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

ayman_salem
Active Contributor
0 Kudos

When retrieving the details of a data provider, the rowCount is in the result

GET /documents/<documentID>/dataproviders/<dataProviderID>

    ......
    <duration>2</duration>
    <isPartial>false</isPartial>
    <rowCount>99</rowCount>
    <flowCount>1</flowCount>
    <dictionary>
       ....
       ....

0 Kudos

Thank you for the response Ayman Salem.

I tried with the URL provided.

Here is the reponse that i am getting.

...................

<updated>2019-04-26T00:12:59.000+05:30</updated>

<duration>1</duration>

<isPartial>false</isPartial>

<rowCount>454</rowCount>

<flowCount>2</flowCount>

...................

But the data provider consists of a combined query (A Minus B) which gave me result only 1 record in UI.

Can you please help me in understanding this.

Thanks in Advance.

ayman_salem
Active Contributor
0 Kudos

The returned "rowCount" is the sum of the number of rows in all queries in the selected data provider.

In your case, this is the total number of rows of both combined query (rowCount A + rowCount B).

...

To get the net number of rows (in your case, 1 row), you should use a workaround.
Use "flow" to get the net result, then count the <row> element

GET /documents/<documentID>/dataproviders/<dataProviderID>/flows/0

<flow>
    <metadata>
        <value dataObjectId="DP0.DO1" type="String">Year</value>
        ....
        ....
    </metadata>
    <row>
        <value>2014</value>
        ...
        ...
    </row>
    <row>
        ...
        ...
    </row>
    <row>
        ...
        ...      
    </row>
</flow>