Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
How to refresh parameters in a report with the viewer toolkit?
Migrateduser
<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
There are no comments yet