Home
Analytics
Viewer wont show up
johnalex14
I have birt integrated into my application, however there are several problems occuring that are not allowing me to use it in my application. Here is how i have the viewer called in the JSP:<br />
<birt:viewer<br />
id="noShow"<br />
pattern="run"<br />
reportDesign="smallChart.rptdesign"<br />
isHostPage="false"<br />
height="230"<br />
width="380"<br />
style="display:none"<br />
format="html"><br />
</birt:viewer><br />
<birt:viewer<br />
id="trowback"<br />
pattern="run"<br />
reportDesign="smallChart.rptdesign"<br />
isHostPage="false"<br />
height="230"<br />
width="380"<br />
format="html"><br />
</birt:viewer><br />
<br />
i originally only had one call of the birt viewer, however, if i only call one instance of the viewer it will not show up at all. So i had to call 2 viewers, and then simply hide the first one, and that somehow, someway made the 2nd viewer work.<br />
<br />
Another error is that the viewer only shows up the first time i run my application, as soon as i go in to edit code and recompile birt ceases to work from there on out unless i restart my entire server.<br />
<br />
It never displayed any form of an error anywhere in my eclipse, so i used the f12 debug function on my IE8 and the following was displayed:<br />
<br />
Here is what i can see:<br />
<div id="params_noShow" style='display:none'><br />
</div><br />
<form id="form_noShow" method="post"></form><br />
<script type="text/javascript"><br />
function loadViewernoShow(){<br />
var formObj = document.getElementById( "form_noShow" );<br />
var paramContainer = document.getElementById("params_noShow");<br />
var oParams = paramContainer.getElementsByTagName('input');<br />
if( oParams )<br />
{<br />
for( var i=0;i<oParams.length;i++ ) <br />
{<br />
var param = document.createElement( "INPUT" );<br />
param.type = "HIDDEN";<br />
param.name= oParams
.name;<br />
param.value= oParams
.value;<br />
formObj.appendChild( param );<br />
}<br />
}<br />
formObj.action = "/inrhodes/run?__report=smallChart.rptdesign&__masterpage=true&__format=html";<br />
formObj.target = "noShow";<br />
formObj.submit( );<br />
}<br />
<br />
the final line (formObj.submit();).... causes the following error:<br />
"Object doesn't support this property or method"<br />
<br />
this is a major problem because obviously my graph doesnt show up, but then even on top of that it causes my javascript to bomb out and the remainer of the javascript on my page stops working as well.<br />
<br />
is this something you may have seen before? any help would be great, thanks!
Find more posts tagged with
Comments
mwilliams
Any way you can recreate this with a JSP page and a report design made from the sample database? This way I can run it and test?
johnalex14
im not sure what you mean... should i almost create a mini application, or should i copy all the birt servlets that i am using so you can see those? I probably should have mentioned that i am using servlets and also building my graph using API instead of the report designer. The graphs work perfectly, its just an issue behind the scenes with the viewer not displaying the graph, or not showing up at all.
johnalex14
I actually discovered the problem. The viewer was having an issue submitting as a form object the whole time, i thne realized that i had my <birt:viewer> inside of a <html:form>. It was causing my system to bomb out becasue it was trying to submit the birt to my form, so i simply had to alter my <html:form>'s so that the birt viewer was placed outside of them. if anyone else is having a similar problem be sure to look for that.