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)
Generate an Excel file without opening the report in the viewer
boulos
Hello, <br><br>
I am using birt 4.3.1 open source (runtime) . I am using an application that executes birt reports and generate pdf only. How can I generate reports in Excel without modifying my application's code? Is there any script that i can add to my rptdesign which converts the generated rptdocument to excel automatically? <br><br>
Reagrds<br>
Boulos
Find more posts tagged with
Comments
JFreeman
<p>Is your current application configured to have separate Run and Render tasks or is it performing an RunAndRender operation?</p>
<p> </p>
<p>If they are separate it should be possible to write a separate render task with the Report Engine API within the report design itself to override the output format with a different render task than what is coded within your application.</p>
<p> </p>
<p>Keep in mind, this will most likely end up actually being mode code than if you were to modify your existing application.</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://wiki.eclipse.org/Separate_Run_and_Render_(BIRT)_2.1'>This
resource</a> should help you get started. It is for an older version but it should still be applicable.</p>
boulos
Hi Jesse, <br><br>
Thanks for your answer. Actually they are separate. <br>
1- do you mean then the code i will put in the rptdesign will override the output type and force it to XLS or XLSX without changing or adding anything to my application? <br><br>
2- could you please share with me an rptdesign which has this configuration so i can better understand how to do it? <br><br>
Regards<br>
Boulos
SChu
<p>Open the report in the html viewer, then click "Link to this page". Take the top link and append this to the end of the url:</p>
<p> </p>
<p>&invokesubmit=true&_format=xls</p>
<p> </p>
<p><img src="
http://i.imgur.com/q6KPpcU.gif"
; alt="q6KPpcU.gif"></p>
<p> </p>
<p>You can then embed the resulting link wherever you wish. You can also add parameters by appending &[PARAMETER NAME]=[PARAMETER VALUE] to the end of the url.</p>
boulos
Hi, <br><br>
Thanks for the reply but this doesn't really answer my question. Actually, I am not allowed to open the report in the html viewer. My application is designed to generate pdf reports directly on the server (in batch mode) and i want to extend the output type to Excel without changing my code. Is this feasible? <br><br>
Regards<br>
Boulos
JFreeman
<p>I believe it may be feasible. However, it is going to be quite a bit more complicated as well as more code that just adding updating your existing applications code.</p>
<p> </p>
<p>Once the report is running it's output format has already been set, which means you can read the setting for the output format from within the report design but you cannot set it. You will instead have to try to trigger running a second version of the report design with the output format overridden from within the report design itself.</p>
<p> </p>
<p>I believe this may be possible but I would recommend updating your existing code. That is the best approach to add Excel output to your application.</p>