cancel
Showing results for 
Search instead for 
Did you mean: 

Paging in webi report html with Restful API

Former Member
0 Kudos

Dear All,

I am trying to implement paging in webi html using RestfulAPI and facing challenge to find out the total number of pages available for that webi report.

Could you please let me know if there is some technique with the help of which total number of pages can be retrieved for a particular webi report.

SAP BO version: 4.2 SP2

URL:GET /documents/<documentID>/reports/<reportID>/pages/<pageIndex>?<optional_parameters>

Where: <pageIndex> is the number of the page to export. It begins with 1 and while the number of report pages is not known in advance, you have to use this URL in a loop, which returns the 404 error message "Not Found" after the last found page

Regards,

Deepak Kumar

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

If your users don't need to see the total number of pages up front, I would use a While loop for this that looks for the 404 Page Not Found error to determine when it has reached the end and then handle that error gracefully.

The only other option I can think of might be to pre-load all of the pages using a While loop so that you can count to get the max number of pages.

If this is just for viewing, it might be easier to just use a call to OpenDocument which will open the report in a viewer that has all of the paging logic already implemented.

-Dell

Answers (0)