When I use the CSV export on a view with many rows, I only get the first page of results in the .csv file, regardless of which page I am looking at. For now, I am disabling pager, but this will be horrendous when the table gets very large.

Is there some argument handling text that need to be added to the view? or is this a bug?

Comments

dman’s picture

Category: bug » feature
Status: Active » Postponed

I haven't encountered any use cases where I'd want paging in my CSV files. Sounds a bit tedious to me - complete dumps are much more useful.
But I guess it could be added in with a medium amount of work. If someone really thinks it's worthwhile.
Seeing this is an old request with no follow-up, I'll flag it down as postponed - a maintainer can "won't fix" if they prefer...

neclimdul’s picture

Version: 5.x-1.2-alpha1 » 5.x-1.x-dev
Status: Postponed » Postponed (maintainer needs more info)

I'd need more information but its likely that attached feeds do not respect the pager. Are you using the attached feed method or the page style?

emdalton’s picture

One circumstance in which one might want to use the pager is when the csv export is timing out and downloading incomplete data. For example, I can only export about 700 rows of my view before it quits. If I could set my pager to 500 rows per page and export each page separately, I could ensure that I capture all rows and then merge them later.

peamik123’s picture

I agree with emdalton. We also could do with paging support enabled in order to download just the page being displayed, but also retaining the capability to download the full set via another feed definition if possible. We too have the situation where there could be a lot of data to download, so reducing it by paging would be a distinct advantage.

I did wonder if there was some kind of argument definition required on the feed in order to get the paging processing going, because it only ever downloads the first page for me as well (this is what psychopf reported above). But I can't find any evidence of any way to use arguments to specify the required page. Has anyone else noticed anything significant in this respect?

Neclimdul - what further information do you require in order to recreate this problem? It seems to be very well defined to me.

greg.harvey’s picture

Title: CSV Export not respecting Pager » Views Bonus Export supports paging
Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

Bringing this back to life and marking with latest dev snapshot - here's an example of where paging is vital:

Integrating with Flash, want to send XML to a Flash app showing, say, the latest 12 published nodes. Views Bonus Export's "XML file" option, without providing a document, is absolutely perfect for this! It allows you to build a view, using Fields, and customise the XML tag values via the UI. Wonderful stuff.

Except, my Flash developer says that's all cool, but s/he wants to call the NEXT 12 results now please. No problem...

ARRRGGG, no paging?? =P

That's what happened to me.

I've fudged it by coding the offset value in a coded view to respond to the URL, but it is a fudge and has nasty consequences on the caching side (e.g. you can't have any!) - if the Views Bonus Export module supported the standard pager, then I could just say to the Flash developer "sure, just go to http://mysite.com/flash/xml?page=1 for the next page!" ... but I can't. =(

adrianmak’s picture

I need support paging of views bonus export module too.

I tested on beta4 and dev version and both aren't support paging.

neclimdul’s picture

Yeah, it appears the feed display plugin that is part of core does not support paging. This was chosen to make things more in line with core views but we may have to make a pageable feed plugin.

Side note, another option you could look at is the services module.

greg.harvey’s picture

Services has a view.get method too, so may well work for some people, but in my case Views Bonus XML export was the quickest win, and I think it always will be for Flash integration. It works really well. I can understand dman not getting someone asking for paging in CSV files, but if the same module and plugin supports XML then you open a whole bunch of other use cases, so I think it needs it - at least for XML, if that makes it easier...? =/

neclimdul’s picture

Yes, I understand the quick win, flash integration was the reason why I wrote the plugin. Most of our more complicated flash integrations since then have relied on services and it really isn't that much harder which is why I suggested it as a possibility. It was written for that purpose.

And I'm not writing this off, which is why I brought up the solution of providing a paging feed display type. This was the suggestion from merlin gave when we talked over this issue.

neclimdul’s picture

Also, paging in d5/views 1 is very different and I'm not heavily vested in writing fixes for it at the moment which is why there hadn't been any activity on this issue previously.

greg.harvey’s picture

I see. I've never really played with integrating Flash this way, in fact I'm not a Flash developer at all (last played with Flash MX *years* ago). I'm working with another company and they don't seem to have much idea about doing this with web services. They just want an XML file they can point to. Lowest common denominator stuff. Shame, as a services-based option might be more flexible. =)

neclimdul’s picture

greg.harvey’s picture

Ohhh, coolness! Thank you! Will try this out next week. =)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

emilyf’s picture

Status: Closed (fixed) » Active

To bring this back to the original point that pschopf was making -- when you do an export why is it only exporting whatever page you're on?? there should be an option for the export (csv,xls,etc) to dump the entire view while allowing your page view to still support the pager so the view can actually load if there's a lot of files. is this an option? is there a way already? seems like this is a lot more common necessity.

neclimdul’s picture

Status: Active » Closed (fixed)

There is, override the pager to off and override the number of items in the feed to unlimited. That is the entire point of feeds being their own display If you're still having problems please open up a separate support request.

zeezhao’s picture

Just a question in relation to #16.

I agree that turning pager off and setting items to unlimited gives you everything in the xls file. However, the view itself now shows all rows on one page... and if you have thousands of rows, it needs to be paged...

How can I get the view to have a pager, but the xls to export everything, without resorting to two different views for the same thing?

Thanks for your help.

edit:
Sorry, now got it! i.e. a display for page and another dispaly for feed.

doubledutch’s picture

This pager functionality is truly wonderful!

One quick question: is there any way to figure out from an paged XML feed what the total number of pages is in a particular view?