2017-06-19 96 views
-1

http://localhost:6405/biprws/raylight/v1/documents/6127/reports/2/無法讀取xml格式的SAP BI報告內容?

加入logontoken接受:應用/ XML頁眉,蔭沒有得到報告的內容,但得到

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<report> 
<id>2</id> 
<name>test</name> 
<reference>2.RS</reference> 
<showDataChanges>false</showDataChanges> 
<style> 
<hyperLinkColors visited="#000000" link="#0000ff" hover="#000000" active="#000000" /> 
</style> 
<pageSettings> 
<margins left="2835" right="2835" top="2835" bottom="2835" /> 
<format orientation="Portrait" height="42094" width="29764" /> 
<records vertical="100" horizontal="20" /> 
<scaling factor="100" /> 
</pageSettings> 
</report 

我應該怎麼做才能內容在XML格式?

回答

1

使用text/xml而不是application/xml

+0

它示出了包括樣式標記將其內容我不想要,我只想得到報告的數據@Joe – svsLm

+0

然後你可能不想要XML格式,但其中一個如csv。 – Joe

0

此調用是具有完整佈局的報表輸出,允許您自行呈現應用程序中的報表(例如,如果要構建Office加載項)。

如果你只想要報告的數據,這裏是你可以做的。首先,檢索the list of elements in your report

http://localhost:6405/biprws/raylight/v1/documents/6127/reports/2/elements 

然後解析響應(其可以是XML或JSON)和類型表的每個元素時,can retrieve its dataset具有下列調用:

http://localhost:6405/biprws/raylight/v1/documents/6127/reports/2/elements/<elementID>/dataset