CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • No 'Export CSV' on custom report
Pages: [1]

Author Topic: No 'Export CSV' on custom report  (Read 1243 times)

axlroach

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
No 'Export CSV' on custom report
December 09, 2010, 01:15:32 pm
Hi,

I've written a custom report.  The report works and displays as I would expect except for the fact that there is no export csv button.  The 'Print Report and PDF' buttons are there, but no export to csv.  I know that my tpl file is being read, because I can type text in and it shows up at the top of the report.  The tpl file only has one line in it:

{include file="CRM/Report/Form.tpl"}


Any idea why the export csv is missing, and is there anything I can do to get it to reappear.  The whole point of building the custom report was so that admin users could generate a csv file.

Thanks!
a


Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: No 'Export CSV' on custom report
December 09, 2010, 08:42:14 pm
Make sure your report should not override $this->_csvSupported as false ( $this->_csvSupported = false ).
CRM/Report/Form.php ( parent class of all reports ) has defined default value for $this->_csvSupported as true.

You may look at Constituent Summary report ( CRM/Report/Form/Summary.php ) and  Constituent Detail report ( CRM/Report/Form/Detail.php ),
Constituent Summary report support CSV but  Constituent Detail report does not hence Constituent Detail report override  $this->_csvSupported = false.

Rajan

axlroach

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
Re: No 'Export CSV' on custom report
December 10, 2010, 03:19:53 am
Hi Rajan,

That was indeed the problem.  Thanks so much for your help.  Hopefully this will help someone else in the future.

cheers,
a

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • No 'Export CSV' on custom report

This forum was archived on 2017-11-26.