Answers.Body: <p>The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.</p>
  
  <p>In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T19:26:14.047Z
Answers.Text: Are you able to accept your own answer so this can be closed off
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-16T07:03:43.583Z
Answers.LastActivityDate: 2016-02-16T07:03:43.583Z
Answers.UserDisplayName: Iantha Scheiwe
Body: <p>I'm setting up some scheduled jobs to email csv reports on a regular basis. I set up the job in scheduled jobs and whether I select "execute now" or run it through a cron job, I get this error:
  Warning: Invalid argument supplied for foreach() in //www/www/wp-content/plugins/civicrm/civicrm/CRM/Report/Utils/Report.php on line 264</p>
  
  <p>I can go into Report.php and add a code check if the arguments sent to "foreach" are arrays (i.e. (is_array($rows)) ), and then it runs without any warning. But, I don't want to be administering a system that I have to go in and modify Report.php. I don't see anyone else with this error. Any ideas why I'd be getting it?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-03T07:41:07.523Z
Comments.Text: which report exactly and which CiviCRM version?
Comments.UserDisplayName: Catorghans
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-03T09:58:30.137Z
Comments.Text: Constituent Details report, version 4.7
Comments.UserDisplayName: Iantha Scheiwe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-03T12:49:20.497Z
Comments.Text: I believe it is related to selected the "Constituent Details" report instead of "Constituent Summary" and the error is actually triggered relative to the csv output request, which I did not realize was affecting the warning. I will do more testing tomorrow to verify that the result is tied to the initial report selection I made. This is what clued me in to the difference in the reports - it is an old entry, but still seems to be relevant in my case. https://forum.civicrm.org/index.php?topic=17001.0
Comments.UserDisplayName: Iantha Scheiwe
Tags: <reports><scheduled-job>
Title: Invalid argument supplied for foreach in Report.php on line 264
ThreadText: # Invalid argument supplied for foreach in Report.php on line 264
  
  (Asked by: username_0 on 2016-02-03)
  
  I'm setting up some scheduled jobs to email csv reports on a regular basis. I set up the job in scheduled jobs and whether I select "execute now" or run it through a cron job, I get this error:
  Warning: Invalid argument supplied for foreach() in //www/www/wp-content/plugins/civicrm/civicrm/CRM/Report/Utils/Report.php on line 264
  
  I can go into Report.php and add a code check if the arguments sent to "foreach" are arrays (i.e. (is\_array($rows)) ), and then it runs without any warning. But, I don't want to be administering a system that I have to go in and modify Report.php. I don't see anyone else with this error. Any ideas why I'd be getting it?
  
  **Tags:** reports, scheduled-job
  
  > **Comments:**
  > **username_1**: which report exactly and which CiviCRM version?  
  > **username_0**: Constituent Details report, version 4.7  
  > **username_0**: I believe it is related to selected the "Constituent Details" report instead of "Constituent Summary" and the error is actually triggered relative to the csv output request, which I did not realize was affecting the warning. I will do more testing tomorrow to verify that the result is tied to the initial report selection I made. This is what clued me in to the difference in the reports - it is an old entry, but still seems to be relevant in my case. https://forum.civicrm.org/index.php?topic=17001.0  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-02-16. Score: 0 | Accepted answer
  
  The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.
  
  In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.
  
  > **Comments:**
  > **username_2**: Are you able to accept your own answer so this can be closed off  
  
  ---
  
  