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)
save report as csv
birtprofi
Hi guys,
I would like to save a report as csv file but without using the export data button. Is this possible?
My report is linked to another reports, also some links are starting stored procedures in the database and so on.
For the customer using it would be easier if they could click on a Link/Button within the Report and then the export of the csv file should start.
thanks for your help
best regards
Rafael
Find more posts tagged with
Comments
mwilliams
Hi Rafael,
So, when they click on the CSV button, you want it to automatically save a CSV copy? Or you want it to run the report in CSV output so that the user can save it?
birtprofi
Hi Michael,
Both options are good for me. Because my customer should not have to do any settings like fields, commas and so on.
But first I would prefer to run the report in CSV output, so that the user can save it.
best regards
birtprofi
Hi michael,
any idea?
best regards.
mwilliams
Sorry for the delay, I was off for the Labor Day holiday.
If you install the CSV emitter plugin, you should be able to use the __format=csv in your url. This would automatically open the report in CSV and from there your user could save the csv file. Here's the link for the CSV emitter. Just click on one of the book versions and there is a sample CSV emitter.
http://www.actuate.com/products/resources/?articleid=11719
The emitter simply uses java.io to write out to a CSV file, so you could simply write this code into your report that you want this and write your data out to CSV if your button is clicked.
birtprofi
Hi Michael,
thanks for your help. I will try out this in the next days. If I have further question, I get in contact with you.
kind regards
rafael
PommePote
Hi,<br />
<br />
I would like to know if it's possible to do something like that :<br />
<blockquote class='ipsBlockquote' ><p>For the customer using it would be easier if they could click on a Link/Button within the Report and then the export of the csv file should start.</p></blockquote>
<br />
Can we create a Button in the report that can generate the report (or some part of the report) in csv ?<br />
<br />
Thanks you,<br />
Regards,<br />
PommePote
birtprofi
Hi PommePote,
yes with the emitter it should be possible. I will try this next week and give you a submit.
In Birt you can link buttons etc. with a subreport (drill-trough function). For example I made a link with drill-trough function and than another report in pdf format opens and at the same time with a stored procedure I change some data in the database, that lock data.
In the same way it should be possible to work with csv.
best regards.
mwilliams
Yes, like birtprofi said, you can create a button in your report and link to the other report. To do this, you'll probably have to install the CSV emitter plugin. From there, you'd just need to create an html button in a html text box in your report and set the button up to say "CSV" on it and to call the url to your CSV report when the button is clicked.