I have a view-based search (drupal 7, newest version of Views) with several exposed filters. By default it shows all results and users have to use the filters to narrow down their search.

I've added 'Views Data Export' module to allow users to download search results via CSV export, if they wish. However it's not working as intended.

I created the export view and attached it to the search view fine. I made sure pager in the export view was set to 'display all items' (otherwise it only shows around 10 results).

I set batched export to yes. I also set each filter to 'remember last selection'.

However, no matter which filters are selected, the data export still shows every record in the database on export.

Anyone know how to fix this? Ideally the export would just show the records displayed on the screen after using the various filters.

  • Have you set the same exposed filters in your data export display?
    – sgoelz
    Jun 16, 2015 at 7:17

2 Answers 2


A possible alternative to consider for the fix you are looking for, is to consider an alternative module that can possibly address all of your requirements, such as the Forena module. Here are a few features of it, which seem to be part of your requirements:

There are many more features that come with Forena, as detailed also in its Community documentation. Refer to the demo site for some sample reports (shipped with the module), or the documentation included with the module (such as the supported document types, of which CSV is just one of them).

Disclosure: I'm a co-maintainer of Forena,
I hope this does not violate the site's policy on self-promotion.

  • aha, seems like there is somebody who has learned about Forena as one of the hidden Drupal gems! Merci (thank you) for accept/upvote! Jul 29, 2015 at 21:37
  • By the way, I created a new tag "datatables" today ... if you're not familiar with datatables, checkout some of the tagged questions (ie those who have an answer from me). If you dont use it yet: you might love it (too ... like I already do for many years). Jul 29, 2015 at 21:40
  • Forena looks awesome! That said, your answer pretty much amounts to "use a different module", which doesn't really answer the OP's original question about how to get Views Data Export to work as expected.
    – joe_flash
    Apr 19, 2019 at 15:27

As @seb alluded to in his comment on the original post, you need to make sure the export display has the same exposed filters as the display you attach it to. If it does, it should automatically inherit the current exposed filter values when the user hits the export button.

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.