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)
How to refresh parameters in a report with the viewer toolkit?
newbird
<p>Hey folks,</p><p> </p><p>I am currently playing around a bit with the viewer toolkit and put together the following jsp:</p><pre class="_prettyXprint _lang-html"><%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Ein Test</title><META http-equiv="Cache-Control" content="no-cache"><META http-equiv="Pragma" content="no-cache"><META http-equiv="Expires" content="-1"><script type='text/javascript' language='JavaScript' src="<%=request.getContextPath() + "/jsapi"%>"></script><script type='text/javascript'> function init( ){ actuate.load('viewer'); actuate.load("parameter"); actuate.initialize( "<%=request.getContextPath()%>", null, null, null, loadParams); } function loadParams() { param = new actuate.Parameter("ProductLine"); param.setReportName("/test01.rptdesign"); param.submit(processParams); } function processParams() { setReportBookmark(); param.downloadParameterValues(runReport); } function setReportBookmark() { reportBookmark = document.getElementById('reportElement').value; } function runReport(param) { runViewer1(param); runViewer2(param); } function runViewer1(param){ viewer1 = new actuate.Viewer('container1'); viewer1.setReportDesign('/test01.rptdesign'); viewer1.setSize(750, 800); viewer1.gotoBookmark(reportBookmark); viewer1.setParameterValues(param); viewer1.submit(); } function runViewer2(param){ viewer2 = new actuate.Viewer('container2'); viewer2.setReportDesign('/test01.rptdesign'); viewer2.setReportletBookmark(reportBookmark); var options2 = new actuate.viewer.UIOptions(); options2.enableToolBar(false); viewer2.setUIOptions(options2); viewer2.setSize(500, 500); viewer2.setParameterValues(param); viewer2.submit(); }</script></head><body onLoad="init()"> <table> <tr> <td colspan="2"> <table> <tr> <td colspan="2"><div id="ProductLine" onchange="processParams()"/></td> </tr> <tr> <td>Reportelement:</td> <td> <select id="reportElement" onchange="processParams()"> <option value="Tabelle">Tabelle</option> <option value="Chart" selected>Chart</option> </select> </td> </tr> </table> </tr> <tr> <td><div id='container1' style='border-width: 1px; border-style: solid;' /></td> <td style="vertical-align: top"><div id='container2' style='border-width: 1px; border-style: solid;' /></td> </tr> </table></body></html></pre><p>It shows a full report on the left side of the screen and a reportlet beside it. When I change the report element the gotoBookmark in the report refreshes and the setReportletBookmart too. But when I change the parameters value only the reportlet refreshes correctly. The request for the report does not even contain parameter informations after the initial request.</p><p> </p><p>What am I doing wrong? Can somebody please explain to me, why it won't work?</p><p> </p><p>Best regards</p>
Find more posts tagged with
Comments
mwilliams
It seems to not like the gotoBookmark with the params setting as well. If you comment that out, the whole report updates as well. It just doesn't jump to the bookmark anymore.
newbird
<p>Thanks for the reply!</p><p> </p><p>Will this behaviour get changed anytime soon so that I am able to use parameters and gotoBookmark together?</p>
mwilliams
I can file an internal bug report for it. I'll let you know when I hear back.
What is the build number on the BVT you're using?
newbird
<p>If the version description in the license is accurate it should be "Actuate BIRT Viewer Toolkit Release 4.2".</p><p> </p><p>If it is not, i downloaded the war-file from <a data-ipb='nomediaparse' href='
http://www.actuate.com/info/birt-viewer-toolkit/'>http://www.actuate.com/info/birt-viewer-toolkit/</a>
; on March 25th. </p>
mwilliams
Okay. I'll post a bug report for it. I'll let you know if I hear back.