Hi,<br />
<br />
I need help in getting the reports in Servlets using the report url.<br />
<br />
Requirement: <br />
We need to deploy the BIRT in a separate machine which is dedicated to BIRT, and the application should generate the reports using BIRT by just a user click. Calling the BIRT url and generating the report happens internally and the user just get the expected report.<br />
<br />
Steps of understanding: <br />
<br />
At present BIRT is running at <a class='bbc_url' href='
http://localhost:3021/birt/'>http://localhost:3021/birt/</a>....<br />
And my application is stationed at <a class='bbc_url' href='
http://localhost:3021/xyz/'>http://localhost:3021/xyz/</a>...<br />
<br />
Both deployed in the same deploy directory of JBoss 4.5<br />
<br />
Steps of generation: - <br />
1. The rptdesign is stored in database in a clob Colum.<br />
<br />
2. Read the xml from database and render the rptdesign file, and change the data-source and parameters (as they are sent at runtime).<br />
<br />
3. Write the xml to a temporary file and copy the modified rptdesign file to the location where BIRT is installed (either by simple copy or by ftp- if BIRT is in a remote box).<br />
<br />
4. Then I call the url and get the byte stream out the URL connection<br />
URL url = new URL("
http://localhost:3021/birt/run?__report=xyz.rptdesign&__format=html");<br />
DataSource source = new URLDataSource(url);<br />
<br />
5. From the source i get the response interms of byteStream and pass it into the response back.<br />
<br />
<br />
Issue Faced:<br />
<br />
The issue is that all formats like pdf, doc, ppt, xls are generating fine, but the html is always showing the "Please Wait.." progress bar. <br />
This is because, when I call the url connection, and the format is html, the first screen loaded is the "Please Wait.." progress bar screen.<br />
Hence this is returned and the same is passed to the response. But the fact is that after this screen is displayed, the report is generated.<br />
But the connection cannot wait or know what the output stream contains (i.e. is it the actual report or generation-pre-screen page that is returned).<br />
If I use frameset to generate the report, then only the frameset panels and the progress bar are displayed and not the required report data.<br />
<br />
Kindly help me!!!!<br />
<br />
Thanks in advance.