Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Using dataservice in Actuate 11
pooh
Helo,
Does anybody has a working example on how to use dataservice in Acutate 11?
I manage to find some examples using Actuate 10 (
http://www.birt-exchange.org/org/devshare/deploying-birt-reports/1013-executing-a-birt-report-using-javascript/)
however they don't working in Actuate 11.
Find more posts tagged with
Comments
pooh
Helo,
I need this quite urgently. Any help would be appreciated. Thanks in advanced!
rmurphy
The reason the example doesn't work is it relied on prototype.js which was shipped with Actuate in version 10. To avoid conflicting with customer's usage of prototype.js, this was removed in Actuate 11. If you include a copy of prototype.js this should still work.
The DataService control allows you to extract data from a report document (rptdocument). Therefore you must run the report somehow before extracting data from it. The approach documented in the DevShare that you referenced runs the report in the iServer and save a copy of it to the encyclopedia. Another approach if this is not desirable would be to include the viewer on the page via JSAPI nested in a hidden div. Then call downloadResultSet on the viewer to get the data from the desired bookmark in the report.
pooh
Hi,<br />
<br />
Thanks for the reply
<br />
<br />
I am trying the second method where I use hidden div and use myViewer.downloadResultSet<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
request = new actuate.data.Request("mytable", 0, 100);
alert(request.getBookmark());
columns = new Array();
columns[0] = "industry_name";
request.setColumns(columns);
var resultSet = myViewer.downloadResultSet(request,null);
</pre>
<br />
However, my code hangs at myViewer.downloadResultSet. Could you please explain where the mistake is?<br />
<br />
Thanks so much!
pooh
Hi,<br />
<br />
I seems the Actuate 11 Js Api Documentation might have some incorrect samples.<br />
<br />
Out there the example shows that we could set null as the call back function, but I get the following error when I do that <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Uncaught actuate.viewer.ViewerException:
Type: err_usage
Message: Argument "callback" is required and must be a function.
</pre>
<br />
However, when I use callback function, I get this error instead.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Uncaught actuate.Exception:
Type: err_usage
Message: The "columnNames" argument must be an array of strings.
actuate.data.impl.ResultSet.initializeviewer.js:1
Ajsapi:1
D
</pre>
rmurphy
I've been looking at this and it appears there is a bug in the underlying function that handles passing the report document to allow for the data extraction. Unfortunately I have not found a work around at this point.
Another approach would be to use the web services API to run and extract data from the report. You can find more information about this approach in the following manual.
http://www.birt-exchange.com/be/documentation/Manuals11SP1/using-iserver-integration-tech.pdf
pooh
hi murphy,
thank you so much for your feedback.
do you happen to have any examples on how this can be done?