Skip to Content
0

Paging in webi report html with Restful API

Dec 13, 2016 at 05:32 AM

79

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Dell Stinnett-Christy Dec 13, 2016 at 02:56 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded