cancel
Showing results for 
Search instead for 
Did you mean: 

Webi Restful SDK XLS Formatting Issue

jeremy_ma_usa
Advisor
Advisor
0 Kudos

I have a customer requirement to generate XLS files per webi section page breaks to meet the requirement to split each business units into seperate XLS files.   This allow me to download the XLS using the request below.

/biprws/raylight/vx/documents/{documentId}/pages

The problem arrise if there number of records going to exceed the A4 (page layout format).   We tried to format the report layout where its configure into 1 page or use legal page format but the pages still splits.  I notice the below SAP Note which explain this issue has been addressed inBI4.1 SP4 (which is version my customer is on).  Yet this is still not working for Excel.  

1991147 - When exporting a Web Intelligence document using RESTful
SDK, the resulting document does n...

Other workaround I consider is using with widthScaling; heightScaling along with mode=normal.  BUT this does not work for the customer as using this removes the WebI section page breaks that we needed to split the page when we designed\needed to create the XLS file.  With wScaling, we are getting the full page.

Accepted Solutions (1)

Accepted Solutions (1)

eric_festinger
Contributor
0 Kudos

hi Jeremy,

Considering the document, it appears that effectively, it shows 3 pages... in default mode:

If you switch to paginated mode, the page count grows up to 6 pages:

As you want to create a separate (exported) XLS file per section, you have to export not the report, but directly the section for each value it can be assigned to.

1) get the values of one the elements of the section by using the datapaths call :

[GET] raylight/v1/documents/29981/reports/1/elements/30/datapaths

Accept: application/xml


which returns for example:

<?xml version="1.0" encoding="UTF-8"?>

<datapaths elementId="23">

    <datapath>DP0.DO7:"978-3-486-57690-0Datenbanksysteme: Eine Einfuehrung"</datapath> 

    <datapath>DP0.DO7:"978-3-8266-1664-8Datenbanken: Konzepte und Sprachen"</datapath> 

    <datapath>DP0.DO7:"978-3-86894-012-1Grundlagen von Datenbanken"</datapath>

</datapaths>

These are the 3 values that you can ask for.

Note also the elementId="23" attribute: it gives you a hint of the report part you should ask the export of.

2) Export the report part (from the line just above) for each value:

For example:

[GET] raylight/v1/documents/29981/reports/1/elements/23?datapath=DP0.DO7:"978-3-486-57690-0Datenbanksysteme: Eine Einfuehrung"

Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

(Don't forget to URLencode...)

Hope that helps,

eric festinger

jeremy_ma_usa
Advisor
Advisor
0 Kudos

Thanks Eric for the suggested workflow. 

How do you figure out path 30? 

raylight/v1/documents/29981/reports/1/elements/30/datapaths



In my system its 21.  I tried to look under and found element vTable as indicator?  Is vTable equivalent to sections?


<element type="VTable">

<id>21</id>

Thanks

eric_festinger
Contributor
0 Kudos

I considered the structure of your document:

GET application/xml (or application/json) "documents/{documentId}/reports/{reportId}/elements" says that:

Section "Isbn" has id 23

Section "Price" (the one under "Isbn"; I'll call it "Price1") has id 28

Section "Price" (the one under "Price1"; I'll call it "Price2") has id 30.

I'm not sure of the meaning of the two "Price" sections as they only have one value --> they won't discriminate anything.

And as they don't discriminate, GET application/xml (or application/json) "documents/{documentId}/reports/{reportId}/elements/{elementId}/datapaths" on every "Isbn" child, shown on the top screenshot, give the same result:

<datapaths elementId="23">

    <datapath>DP0.DO7:"978-3-486-57690-0Datenbanksysteme: Eine Einfuehrung"</datapath> 

    <datapath>DP0.DO7:"978-3-8266-1664-8Datenbanken: Konzepte und Sprachen"</datapath> 

    <datapath>DP0.DO7:"978-3-86894-012-1Grundlagen von Datenbanken"</datapath>

</datapaths>

I just picked one of them ("Price2") for my previous answer: sorry if it was confusing.

Regards,

eric festinger

jeremy_ma_usa
Advisor
Advisor
0 Kudos

Its been awhile I update this post.  I want to let anyone else reading this thread to careful consider the path to export report wwhen report dimenion changes.  Relying on section break on report to place logic on page break is not as reliable.  Alternatively, Eric's soltuoin to extract report as section filter output will produce tigher export results which you may map back to your custom app.

Thanks Eric for providing the alternate solution.  Cheers!

Answers (0)