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)
Problems when using Data Service
pooh
Hi,<br />
<br />
I am trying to use DataService to excess data from my table. Table Name is "mytable"<br />
<br />
When I try to use rs.getColumnNames() in displayData function, it hangs there.<br />
<br />
<br />
Here is the portion of my code : <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function dataServiceInit()
{
alert("dataServiceInit");
actuate.load("viewer");
actuate.initialize( "http://localhost:8900/iportal/", null, null, "", createDataService );
}
function displayData(rs)
{
alert("displayData");
var columns = rs.getColumnNames();
alert(columns.length);
while (rs.next()){
for (var i = 0; i < columns.length; i++){
window.alert(rs.getValue(columns[i]));
}
}
}
callBackError=function(exception){ window.alert('ERROR: ' + exception); };
function createDataService()
{
alert("createDataService");
dataService = new actuate.DataService("http://localhost:8900/iportal/" );
var request = new actuate.data.Request( "mytable" );
request.setStartRow( 1 );
request.setMaxRows( 50 );
dataService.downloadResultSet( "/Home/administrator/ci_reports/table.report.rptdesign", request, displayData(request) );
}
</pre>
Find more posts tagged with
Comments
There are no comments yet