Answers.Body: <p>You could also export the data to a CSV with your own SQL commands. These commands could be created in a way to take parameter that your client could set through the CP.</p>
  
  <p>You'd need to <a href="https://pluginfactory.io/" rel="nofollow noreferrer">create a plugin</a> with a <a href="https://craftcms.com/docs/plugins/controllers" rel="nofollow noreferrer">controller</a> method that runs your SQL query. Take a look at the docs for more info on <a href="https://craftcms.com/docs/plugins/database" rel="nofollow noreferrer">querying the database</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T15:23:34.573Z
Answers.LastActivityDate: 2017-01-12T15:23:34.573Z
Answers.UserDisplayName: Luke Pearce
Body: <p>I'm wondering what the best way to export order data from Craft Commerce would be for the client's order and revenue reporting.</p>
  
  <p>Ideally they'd like to be able to export a report after filtering by date on the Commerce > Orders screen, which I think would also be a great feature request.</p>
  
  <p>For now it looks like Sprout Export might be the only/best option. I'm wondering if this has come up for anyone who might have other suggestions?</p>
  
Tags: <plugin-craftcommerce>
Title: How to export order data for reporting
ThreadText: # How to export order data for reporting
  
  (Asked by: username_0 on 2017-01-09)
  
  I'm wondering what the best way to export order data from Craft Commerce would be for the client's order and revenue reporting.
  
  Ideally they'd like to be able to export a report after filtering by date on the Commerce > Orders screen, which I think would also be a great feature request.
  
  For now it looks like Sprout Export might be the only/best option. I'm wondering if this has come up for anyone who might have other suggestions?
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-12. Score: 1
  
  You could also export the data to a CSV with your own SQL commands. These commands could be created in a way to take parameter that your client could set through the CP.
  
  You'd need to [create a plugin](https://pluginfactory.io/) with a [controller](https://craftcms.com/docs/plugins/controllers) method that runs your SQL query. Take a look at the docs for more info on [querying the database](https://craftcms.com/docs/plugins/database).
  
  
  ---
  
  