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)
Parameter across web application to BIRT report
bskrishnan
<p><span style="font-family:arial, sans-serif;">I have created JSAPI application to display dashboard. On my dashboard I have report parameter gadget and few charts and reports. Report parameter gadget and charts/reports are linked so if I change the parameter values, report/charts gets refreshed. What I want to achieve is I want to pass in dynamic value from my web application to Parameter gadget and report/chart should execute for those parameter value. Or I have to pass in parameter values directly to reports/chart.</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">I managed to develop JavaScript to pass in dynamic value to parameter gadget and dynamically click the "Apply button" on the parameter gadget. Since Reports/chart creation time inside the dashboard changes, parameter value gets applied some time and not some time. I want to know the correct and consistent way to achieve this.</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">So I raised support call with actuate. Then I found that I can set session variable values as the parameter values on my web application and report/chart design can pick-up these values on beforeFactory() using,</span></p>
<p> </p>
<p><span style="color:#000000;"><span style="font-family:consolas;"><span style="font-size:10pt;">importPackage(Packages.javax.servlet.http);</span></span></span></p>
<p><span style="color:#000000;"><span style="font-family:consolas;"><span style="font-size:10pt;">importPackage(Packages.javax.servlet);</span></span></span></p>
<p><span style="color:#000000;"><span style="font-family:consolas;"><span style="font-size:10pt;">var request = reportContext.getHttpServletRequest();</span></span></span></p>
<p><span style="color:#000000;"><span style="font-family:consolas;"><span style="font-size:10pt;">var session = request.getSession();</span></span></span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">When I run this report on local machine I get request object, but when I run the same report in server it is null.</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">I get following error,</span></p>
<p><span style="color:#000000;"><span style="font-family:consolas;"><span style="font-size:10pt;">SEVERE: There are errors evaluating script "importPackage(Packages.javax.servlet.http);</span></span></span></p>
<p><span style="font-family:arial, sans-serif;">Is it report in server not able to load the correct jar [I think it is servlet-api.jar]</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">It would be great help, if I get the solution for this issue. If the above approach is not right, please suggest.</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">Thanks in advance.</span></p>
<p> </p>
<p><span style="font-family:arial, sans-serif;">[I am using iHub3 </span></p>
<p>ActuateBuild="230A131216"</p>
<div>ActuateVersion="23 Augusta R1 Development"]</div>
Find more posts tagged with
Comments
JFreeman
<p>In the iHub 3 230A131216 build it is a known behavior that server side the reportContext object cannot obtain the HttpServeltRequest object. There is currently an active enhancement request for this functionality to be added. I would recommend contacting Actuate Support to request your company be added to the enhancement request.</p>
bskrishnan
<p><span style="font-family:tahoma, geneva, sans-serif;"><strong><span style="font-size:10pt;color:rgb(0,0,0);">Hi Jesse,</span></strong></span></p>
<p> </p>
<p>Thanks a lot for your information. Was struggling on this for some time and support guys [who was aliasing with me] was also not aware on this. </p>
<p> </p>
<p><span style="font-family:tahoma, geneva, sans-serif;">Will get in touch with <span style="color:rgb(40,40,40);">Actuate Support.</span></span></p>
<p> </p>
<p><span style="font-family:tahoma, geneva, sans-serif;"><span style="color:rgb(40,40,40);">Regards</span></span></p>
<p><span style="font-family:tahoma, geneva, sans-serif;"><span style="color:rgb(40,40,40);">Santhana</span></span></p>