Answers.Body: <p>As you've noted, your best bet is to use Drupal to generate the XML (whatever shape that might take as Alan Dixon commented).</p>
  
  <p><a href="https://www.drupal.org/project/views_data_export" rel="nofollow">Views Data Export</a>, <a href="https://www.drupal.org/project/views_datasource" rel="nofollow">Views Datasource</a> or <a href="https://www.drupal.org/project/services_views" rel="nofollow">Services Views</a> will work if you require the flexibility of Views filters, etc.  It really depends on what data need to be in the reports.  As Eli noted in the comments above, using Services by itself could work, but depending on how the data is coming in, a Views solution is probably your best.</p>
  
  <p>Another module to consider (again, depending on the data you need) is <a href="https://www.drupal.org/project/civicrm_entity" rel="nofollow">CiviCRM Entity</a>. It will open up <em>a lot</em> more CiviCRM data to Drupal Views.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-17T18:01:11.437Z
Answers.LastActivityDate: 2015-12-17T20:04:43.777Z
Answers.LastEditDate: 2015-12-17T20:04:43.777Z
Answers.UserDisplayName: Allen Hutchison
Body: <p>I work for a small nonprofit. Our funding body previously required reports in csv format. they now want them in xml. Of course they are not providing any funds!
  Can this be done via a custom report or would it be an extension?
  Would Drupal views combined with the views Data export module work? 
  any assistance or pointers greatly appreciated</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-14T00:18:16.393Z
Comments.Text: Have you looked at csv to xml converters? Search for "csv to xml"
Comments.UserDisplayName: Sanjay Jain
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-14T04:13:17.110Z
Comments.Text: Thanks Sanjay that's sort of a last resort if I can't build it in to civi.
Comments.UserDisplayName: suzi
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-14T18:11:32.257Z
Comments.Text: Not sure about in civiCRM, but if you can search up the tables you need through views (can be tricky to configure depending on what you need) the drupal views data export module can export xml format nicely. Drupal Services views can also set up a REST style resource that folks can grab in xml format (maybe you can automate report pulls this way) but I believe you need to be a bit careful about security in that case.
Comments.UserDisplayName: Eli Lisseck
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-15T19:23:44.013Z
Comments.Text: You really want to be more specific about your requirements first. XML is not really a format, but an abstract class of formats, and the details can be very different from one kind of XML to another. If your funding body is just asking for 'xml', then they're probably confused. They probably want a specific kind of xml, e.g. as defined by a document type.
Comments.UserDisplayName: Alan Dixon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-09T23:47:18.010Z
Comments.Text: Suzi I have the same problem. Did you end up with a solution? And was this for DEX reporting?
Comments.UserDisplayName: LesleyJill
Tags: <civireport><drupal-views>
Title: Report or export in xml format
ThreadText: # Report or export in xml format
  
  (Asked by: username_0 on 2015-12-13)
  
  I work for a small nonprofit. Our funding body previously required reports in csv format. they now want them in xml. Of course they are not providing any funds!
  Can this be done via a custom report or would it be an extension?
  Would Drupal views combined with the views Data export module work?
  any assistance or pointers greatly appreciated
  
  **Tags:** civireport, drupal-views
  
  > **Comments:**
  > **username_1**: Have you looked at csv to xml converters? Search for "csv to xml"  
  > **username_0**: Thanks username_1 that's sort of a last resort if I can't build it in to civi.  
  > **username_2**: Not sure about in civiCRM, but if you can search up the tables you need through views (can be tricky to configure depending on what you need) the drupal views data export module can export xml format nicely. Drupal Services views can also set up a REST style resource that folks can grab in xml format (maybe you can automate report pulls this way) but I believe you need to be a bit careful about security in that case.  
  > **username_3**: You really want to be more specific about your requirements first. XML is not really a format, but an abstract class of formats, and the details can be very different from one kind of XML to another. If your funding body is just asking for 'xml', then they're probably confused. They probably want a specific kind of xml, e.g. as defined by a document type.  
  > **username_4**: username_0 I have the same problem. Did you end up with a solution? And was this for DEX reporting?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2015-12-17. Score: 1
  
  As you've noted, your best bet is to use Drupal to generate the XML (whatever shape that might take as username_3 commented).
  
  [Views Data Export](https://www.drupal.org/project/views_data_export), [Views Datasource](https://www.drupal.org/project/views_datasource) or [Services Views](https://www.drupal.org/project/services_views) will work if you require the flexibility of Views filters, etc. It really depends on what data need to be in the reports. As Eli noted in the comments above, using Services by itself could work, but depending on how the data is coming in, a Views solution is probably your best.
  
  Another module to consider (again, depending on the data you need) is [CiviCRM Entity](https://www.drupal.org/project/civicrm_entity). It will open up *a lot* more CiviCRM data to Drupal Views.
  
  
  ---
  
  