How do I add a link to the CSV download created by the Forena module to my module page?

Do I just copy the link in 'inspect element' and put that in my $output variable that I return on the recommendations page?


1 Answer 1


For any report that you create (using Forena), just add .csv as an extention to the report (output) URL. That contains the CSV equivalent of that report.

As a sample, consider the sample report located at /reports/sample.states (in your own site, one of the samples shipped with Forena). Change the URL to /reports/sample.states.csv (= just add .csv to it) to get the same report in .csv format.

If you'd adding such .csv to the URL of the Simple Table of States in the demo site, the result is like so ...

Same technique applies for other supported extensions (export formats), such as adding .html, .xls (MS Excell), .pdf or .doc (MS Word).

By the way, all data blocks are accessible directly via their url also, provided you have permission to access that block. Here are a few samples of that, for the sample report located at /reports/sample.states:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.