Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
enableIV() timing issue
kimyx
I'm using Actuate 11 M9 beta to integrate reports into an existing mashup. I want the reports to come up immediately with the interactive viewer enabled. I have javascript client code like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script defer="defer" type="text/javascript" language="JavaScript">
actuate.load("viewer");
actuate.load("parameter");
actuate.initialize("${birtURL}/", null, null, null, runReport);
var viewer;
function runReport() {
viewer = new actuate.Viewer("${id}Div");
viewer.setReportName("${reportPath}");
setReportWidth("${reportWidth}", viewer);
setReportHeight("${reportHeight}", viewer);
setReportParameters("${reportParams}", viewer);
viewer.submit(afterViewerLoaded);
}
function afterViewerLoaded() {
viewer.enableIV();
//setTimeout(enableIV, 1000);
}
function enableIV() {
viewer.enableIV();
}
</script>
</pre>
<br />
This code doesn't work with my current report. It seems the data isn't quite ready at the time viewer.enableIV() is called. It results in blinking red text in the viewer toolbar in the page count area, kind of like this:<br />
<br />
1/ <span style='color: red'>10+</span><br />
<br />
The menu dropdown in the toolbar is non-functional too.<br />
<br />
If I then click in the current page number field and press Enter, it makes another ajax request and all is well. If I don't call enableIV() at all, everything is ok.<br />
<br />
I found that if I wait a second before calling enableIV(), as shown commented out above, it works as expected.<br />
<br />
A previous version of the same report didn't have the problem, so there must be some kind of race condition on the client. I'm testing on an ubuntu laptop with jboss 4.2.3 and firefox 3.0.14, and it's pretty bogged down when this is running. It's not a big report, just a simple table where the query is limited to 50 or fewer rows and the page limit is 10 rows. It doesn't seem to matter what I set the row limits to.<br />
<br />
Ideas? Questions? The workaround is ok but I'm not sure if a second is always going to be adequate.<br />
<br />
Thanks,<br />
Kim
Find more posts tagged with
Comments
rmurphy
Kim,
I have not been able to reproduce this issue. Is this app using iServer Express, or are you just leveraging the Interactive Viewer deployed as a WAR?
Rob
kimyx
Rob - it's using the engine deployed as a war in jboss with mysql.
I'm running 64-bit ubuntu. The app server has a lot of data cached in memory and is using about 3GB on a 4GB machine. It's not actually thrashing at the time, but it's close. It seems to be a race condition of some kind because on an earlier version of the report, the issue didn't occur for me either.
Thanks,
Kim