cancel
Showing results for 
Search instead for 
Did you mean: 

Create reports in RESTful webservice

Former Member
0 Kudos


Hi

I am using BO 4.1 SP2.

I know that report can be created using restful url.

Is there any url to connect the created report with a particular universe. help me in this

Regards,

Kavitha S

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor
0 Kudos

Hi Kavitha,

Have a look at page 249 of the following document:

http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_webi_restful_ws_en.pdf

To add a Dataprovider

POST 

http://<serverName>:6405/biprws/raylight/vx/documents/{documentId}/dataproviders

BODY

<dataprovider>

      <name>Query1</name>

      <datasourceId>1234ABCD</datasourceId>

<dataprovider>

Dan

Former Member
0 Kudos

Hi Dan,

Thanks for your information.

whether can we create crosstab report in RESTful webservice?

Is there any url available to create crosstab report?

Regards,

Kavitha S

former_member197386
Active Contributor
0 Kudos
former_member197386
Active Contributor
0 Kudos

Is your question answered now?

Regards,

Anthony

Former Member
0 Kudos

Hi Anthony,

I am working on this.Once i got i will update on this.

Regards,

kavitha S

Former Member
0 Kudos

Hi Daniel,

Even I am working on creating reports using rest web service.

Can you explain how to retrieve the datasourceId which is used to create data provider for a document?

Thanks in advance.

Regards,

Mithila Suvarna

daniel_paulsen
Active Contributor
0 Kudos

Hi Mithila.

you can get the ID of the universe to add by requesting the list of uinverses.  Here's a simple workflow of creating a report and adding a dataprovider:

List out the universes

GET /biprws/raylight/v1/universes

response

<universes>
...
<universe>
  <id>5145</id>
  <cuid>AX3cE9nWhMBLtXyWJ56OoDQ</cuid>
  <name>eFashion</name>
  <type>unv</type>
  <folderId>532</folderId>
</universe>
...
</universes>

====================================
Create a document

POST /biprws/raylight/v1/documents

<document>
  <name>My new Document</name>
  <folderId>5848</folderId>
</document>

response

<success>
  <message>The resource of type "Document" with identifier "6757" has been successfully created.</message>
  <id>6757</id>
</success>

=====================================
Add a datasource to the new document (6757) using the name and ID from the universe you want to use

POST /biprws/raylight/v1/documents/6757/dataproviders

<dataprovider>
  <name>eFashion</name>
  <dataSourceId>5145</dataSourceId>
</dataprovider>

response

<success>
  <message>The resource of type "Data provider" with identifier "DP0" has been successfully created.</message>
  <id>DP0</id>
</success>

======================================
List the dataproviders in the new webi document

GET /biprws/raylight/v1/documents/6757/dataproviders

response

<dataproviders>
  <dataprovider>
    <id>DP0</id>
    <name>eFashion</name>
    <dataSourceId>5145</dataSourceId>
    <dataSourceType>unv</dataSourceType>
  </dataprovider>
</dataproviders>

I hope this helps,

Dan

Former Member
0 Kudos

Thanks a lot. It did help !

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Dan,

I am able to add query specification but after updating report specification for table syntex blank table is created with table header.

Could you please provide sample java code to invoke rest service which is used in vedio as BO server is not available on my localendar system and I want to generate reports with complex charts as well and lagging in syntex.

Could you please share sample java code.

daniel_paulsen
Active Contributor
0 Kudos

Hi Amol,

Sorry, but I'm not sure that I could legally post the samples on SCN as they are part of our licensed install.  You will need to get them from the installer.  You could download the SP06 install and simply select the samples only and deselect everything else.

Dan

Former Member
0 Kudos

Hi Dan,

Thanks for help.

Just one issue is after updating query specification of dataprovider and adding table syntex on report with updating report specification. When I seen report in document. It is empty table with header only.

Who dictionary element of dataprovider is going to be populated?

Thanks,

Amol.

daniel_paulsen
Active Contributor
0 Kudos

Hi Amol,

If you refresh the report, does the table populate? 

It could also be that you added the "header" rowgroup without adding the "body" rowgroup.  Its difficult to say without seeing what it is you are passing in the request.

Dan

Former Member
0 Kudos

Hi Dan,

Have added body group as well in the report specification as when I open report by launch pad it shows empty table and after running query which I have updated through data provider specification in launchpad design mode I am able to see data in the report. Means some have query is not run and fetched data in report while updating report specification.

Have see one difference in dataprovider as </dictionery> element is empty in dataprovider when I seen dataprovider details.

Thanks,

Amol.

Former Member
0 Kudos

Hi Dan,

Yes, after refresh the report it is showing the data.

Could you please provide me Link to download SP6.

Thanks,

Amol.

former_member197386
Active Contributor
0 Kudos

Hi Amol,

Please, could you create a new topic when for posting a new question? Because when a question is tagged as "Answered", we assumed that we don't need to look at it anymore

Thanks for understanding!

Best regards,

Anthony

Former Member
0 Kudos

Hi,

Above post gives information about adding dataprovider to document. How to create report using dataprovider in Rest API.

Can i get next workflow please i.e. after adding dataprovider to document how to create query and add to dataprovider and show table on report.

daniel_paulsen
Active Contributor
0 Kudos

Hi Amol,

A report tab is automatically created when creating a new document since you can't have a document without a report.  it will have a report id of "1" and a name "new report"

if you want to add a new report:

POST  .../raylight/v1/documents/<docId>/reports

body:

    <report>

     <name>my new report</name>

    </report>

After adding the dataprovider, you need to add a query specification (Content-Type : text/xml) to the document:

PUT  ... raylight/v1/documents/<docId>/dataproviders/<dpId>/specification

body:  the query specification required

Save the document with the query specification

PUT  .../raylight/v1/documents/<docId>

add the report specification (Content-Type: text/xml) defining the layout of the new report

PUT .../raylight/v1/documents/<docId/reports/1/specification

save again.

Sample Java code shipped with BI4.1 SP06 that shows how to perform various tasks such as creating new documents, adding dataproviders and creating reports.  See the following post for more details on how to install and run the samples:

Dan