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)
Attachments in report
tule
Hi all,
Is it possible to attach various documents into report similar as attachments in email?
After exporting report to PDF (for example), it should be possible to download attached doc from report.
Thanks in advance.
Find more posts tagged with
Comments
kclark
What other documents are you wanting them to be able to download? You should be able to use a text object and create some HTML links to those documents.
tule
Hi kclark, thanks for your very fast response.
I need to create one huge report with a lot of information. There is several documents related with this report (e.g. .doc, .xls, .jpg, .png). Those related documents are saved somewhere on file system and I need to somehow find a way to incorporate a those documents with the report. The idea is that the customer gets by email generated report (e.g. as PDF), open it up and then have the opportunity to read or download those related documents (just download should be enough).
I tried to save documents content to byte array on beforeFactory event. I've created a link on the page (text field, HTML type) but can't figure out how to trigger download on click.
Thanks in advance.
kclark
Since you have the data in a byte array you might be able to write a java class to write the data to a file, and use some javascript to allow them to select a location. I'll try and write an example for you.
tule
Hi kclark,
Thank you very much for your support. I really appreciate it.
That's a great idea, and it could be the solution. I will focus my research in this direction.
Best regards.
falcom
<blockquote class="ipsBlockquote" data-author="kclark" data-cid="113952" data-time="1360103706"><div><p>Since you have the data in a byte array you might be able to write a java class to write the data to a file, and use some javascript to allow them to select a location. I'll try and write an example for you.</p></div></blockquote><p>Hi,</p><p>I would like to attach a text file to the report. How it could be possible in BIRT? Will you be so kind to show me some hints or example. Attachment is txt file, output is in html or pdf. Thanks in advance.</p><p>Best regards</p>
kclark
<p>You could try using a text item in your report. Make sure the type is HTML and you could do something like this:</p><pre class="_prettyXprint"><a href="/home/kclark/someFile.txt">Text file</a></pre>