on 05-20-2016 11:15 AM
Is it possible to call a parameterized webi report with "Restful Web Services SDK 4.1" to get html as service response?
HI Daniel,
Thanks for replying.
Below code snippiet is working well for non-prompt webi reports.
function exportReportHtml(docId,repId) {
var x = docId; var y = repId;
console.log("Getting Report html.");
$.ajax({url: server + '/biprws/raylight/v1/documents/'+x+'/reports/'+y, type: 'get',
complete: function(xhr) { parseReportHtml(xhr.responseText); },
beforeSend: function(xhr) { xhr.setRequestHeader('Accept', 'text/html'); xhr.setRequestHeader('X-SAP-LogonToken', logonToken);
}
});
}
I am trying to pass prompt(someKey) with value(someValue) as below:
url: server + '/biprws/raylight/v1/documents/'+x+'/reports/'+y?someKey=someValue
Please provide me the documentation link as you mentioned in response above.
Regards, Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepak,
You won't be able to pass parameters on the URL. You will have to post them in the body of an HTTP request where your body (if using XML) would look something like:
<parameters>
<parameter dpId="DP1" type="prompt" optional="false">
<id>0</id>
<technicalName>Enter value(s) for Year</technicalName>
<answer>
<values>
<value>2005</value>
</values>
</answer>
</parameter>
</parameters>
Then you can call the export function
The RESTful documentation can be found at:
SAP BusinessObjects Business Intelligence platform 4.1 – SAP Help Portal Page
The document is called: SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Layer
Dan
Hello Deepak,
Sure, you can do that in a few REST calls:
1. logon
2. get the html ouput of your report
3. logoff
Best regards,
Anthony
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anthony,
Thanks for the quick response, let me rephrase my question.
I am able to get html of only those report which don't have prompts, as a response of Rest call. I need to know the approach to pass prompt value as query string to call Rest service.
Please let me know.
Below is code snippet to call Rest service.
Hi Deepak,
use:
GET .../raylight/v1/documents/<docId>/parameters
to get the template for parameters and then fill in the values and PUT back to the same URL using the filled in template in the body of your post..
after that, you can view as html.
The workflows for different parameter types (context, prompt, hierarchical etc) are described in the documentation under "Refreshing a document"
Dan
HI Daniel,
Thanks for replying.
Below code snippiet is working well for non-prompt webi reports.
function exportReportHtml(docId,repId) {
var x = docId; var y = repId;
console.log("Getting Report html.");
$.ajax({url: server + '/biprws/raylight/v1/documents/'+x+'/reports/'+y, type: 'get',
complete: function(xhr) { parseReportHtml(xhr.responseText); },
beforeSend: function(xhr) { xhr.setRequestHeader('Accept', 'text/html'); xhr.setRequestHeader('X-SAP-LogonToken', logonToken);
}
});
}
I am trying to pass prompt(someKey) with value(someValue) as below:
url: server + '/biprws/raylight/v1/documents/'+x+'/reports/'+y?someKey=someValue
Please provide me the documentation link as you mentioned in response above.
Regards, Deepak
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.