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)
ProgressBarFragment
martinf
<p>Hi</p>
<p> </p>
<p>I know that there's a ProgressBarFragment available in Eclipse, but how can I load it and make it available in BIRT?</p>
<p> </p>
<p>Martin F</p>
Find more posts tagged with
Comments
Clement Wong
<p>I'm not sure what your use case is. Can you please clarify?</p>
<p> </p>
<p>BIRT's viewer has a JSP named <strong>ProgressBarFragment.jsp</strong>.</p>
<p> </p>
<p>For the Designer, It's under <em>...eclipse\plugins\org.eclipse.birt.report.viewer_x.y.z.vyyyymmddhhmm\birt\webcontent\birt\pages\control</em></p>
<p> </p>
<p>If you have deployed it to an application server, you'll find the same file under<em> ...webapps\birt\webcontent\birt\pages\control</em></p>
martinf
<p>Clement</p>
<p> </p>
<p>I would like to show a progress bar to tell how many time before the report is ready. How can I do it?</p>
<p> </p>
<p>Martin</p>
Clement Wong
<p>You're looking for countdown timer? As far as I know, you won't be able to tell how much time is remaining for a report because it will depend on various factors, especially the data source(s) the report is connecting to and the data volume.</p>
martinf
<p>Clement</p>
<p> </p>
<p>What about a "Wait, we are preparing your report"?</p>
<p>Possible?</p>
<p> </p>
<p>Martin</p>
Clement Wong
<p>It's currently reading a resources file, and for English it's showing "Processing, please wait..." in ProgressBarFragment.jsp.</p>
<pre class="_prettyXprint">
<TABLE WIDTH="250px" CLASS="birtviewer_progressbar" CELLSPACING="10px">
<TR>
<TD ALIGN="center">
<B>
<%= BirtResources.getMessage( "birt.viewer.progressbar.prompt" )%>
</B>
</TD>
</TR></pre>
<p>You can modify either the resource, or hard-code a message there.</p>
martinf
<p>Clement</p>
<p> </p>
<p>But how to have it in a report? How to bring this message? It doesn't seem to be out-of-the-box. How can I do it?</p>
<p> </p>
<p>Martin</p>
Clement Wong
<p>Sorry, I don't understand. You want a different progress bar message displayed <strong><em>from </em></strong>the report itself, while the report is running?</p>
<p> </p>
<p>The Open Source BIRT Viewer does not support progressive viewing like the commercial BIRT Viewer. The(HTML) progressive viewing option will display the first page as soon as it has been completed, where as the standard viewing will wait until all pages have been completed before displaying any content.</p>
<p> </p>
<p>It is possible in OS BIRT, but you'll have to DIY. Here is one reference on how it might be done:</p>
<p><a data-ipb='nomediaparse' href='
http://digiassn.blogspot.com/2007/10/birt-progressive-viewing-during-render.html'>http://digiassn.blogspot.com/2007/10/birt-progressive-viewing-during-render.html</a></p>
;
martinf
<p>Clement</p>
<p> </p>
<p>In BIRT 4.5, I don't see a tool to drag and drop this "Wait..." message (I don't care about progress bar, I need anything to tell people that the report will come shortly).</p>
<p>I really don't know how to have this "Wait..." message in my report.</p>
<p>What are the steps? Where can I find this "tool"?</p>
<p>Where do I have to place it in my report to have it showed during the process of report?</p>
<p> </p>
<p>Martin</p>
Clement Wong
<p>How are you executing/generating and viewing this report?</p>
<p> </p>
<p>There is no tool to drag and drop a message. The dialog is HTML based in the OS BIRT Viewer, and will appear in the bottom part of the /frameset.</p>
<p> </p>
<p>When you run the attached sample report in the Viewer, do you see the dialog appear?</p>
martinf
<p>Clement</p>
<p> </p>
<p>I run my reports with tomcat, with this kind of url:</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='/birt/run?__report=test_waitmessage.rptdesign&__format=pdf&'>
http://111.222.333.444:8080/birt/run?__report=test_waitmessage.rptdesign&__format=pdf&</a></p>
;
<p> </p>
<p>I tested your rptdesign this way and I didn't see a wait message.</p>
<p> </p>
<p>I probably have to configure something in the BIRT directory on tomcat??</p>
<p> </p>
<p>Martin</p>
Clement Wong
<p>The way you're using the Viewer is via the /run servlet (<a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/documentation/integrating/viewer-usage.php'>http://www.eclipse.org/birt/documentation/integrating/viewer-usage.php</a>)
and you should see it in HTML format, but may not with PDF format. </p>
<p> </p>
<p>As a test, try removing the &__format=pdf option.</p>
<p> </p>
<p>Also as a test, keep the &__format=pdf and add a longer page count (99999, for example) to simulate an increase the time to generate the report.</p>
<p> </p>
<p>Another solution, <strong>although not necessary</strong>, is to have an intermediate page that pop-ups up a message, and uses JavaScript to change browser address to the PDF.</p>
<p> </p>
<p>Save this as a JSP and put it under ...birt\webcontent:</p>
<pre class="_prettyXprint _lang-">
<html>
<body>
<div id=loadmsg style="position:absolute; left:40%; top:35%; width:250; height:150; border-width:4; border-style:ridge; background-color:#eeeeee">
<center><br><br><font face='Arial' Size=3><b>Please wait.<br>Loading report...</b></font><br><br>
<img src="http://pic2.pbsrc.com/common/loading.gif"><br><br></center></div>
<script>
//window.location = "http://servername:8080/birt/run?__report=wait.rptdesign&__format=pdf&__parameterpage=false&theCount=99999";
window.location = "http://servername:8080/birt/run?__format=pdf&__parameterpage=false&__report=<%= request.getParameter("report") %>.rptdesign";
</script>
</body>
</html>
</pre>
<p>Then run your report with the JSP, like</p>
<pre class="_prettyXprint">
http://servername:8080/birt/webcontent/redirect.jsp?report=wait</pre>
<p>Before implementing, please do run the tests in HTML and with /frameset to see what behaviors you see in your environment.</p>
<p> </p>
<p>Attached is another example report, with a parameterized delay (default of 5000 ms). In Tomcat 8 and BIRT 4.5.0, I tested the simple JSP page with the example report, and it's working as we expect to display a simple dialog and when the PDF is completed will display in the browser.</p>