This would be absolutely perfect if there was a way to pick the order the columns are displayed when defining the report. Assigning a weight to them when you enable them perhaps?

Comments

mukatira’s picture

Version: 6.x-1.7 » 6.x-1.8

I am looking for this exact feature as well. Assigning weights sounds perfect.
Alternately, if Webform reports can show the same data Webform ->Results -> Table can display (sans some columns) it would be awesome.

ALSO can the date display look like 2/3/2009 instead of 2, 3, 2009?

Thanks for a good module
Sm

jn0x7a3’s picture

I agree that this module would be much better if one could choose the order in which the columns are displayed. Any chance this feature will be added in the near future?

jimbullington’s picture

Yes, I'm working towards having more column attributes in the near future - thanks for your patience!

rsacchi’s picture

mukatira, about the date: I did it yesterday, you need to edit the file: webform_report.inc and the the line:

$values[$row->sid][-1] = array('data' => $row->user, 'field' => -1);
$values[$row->sid][-2] = array('data' => date('d/m/Y', $row->submitted), 'field' => -2);

--
rsacchi

jimbullington’s picture

Thank you for the fix - however, I think the user is looking for a way to display webform dates as mm/dd/yyyy (or some other valid date format) instead of comma-separated (mm,dd,yyyy) as it does now (times as well). I hope to have a patch for this shortly - unless someone else has already done this...

loophole080’s picture

#4 is correct and works with any php time format string (eg d/m/Y or d,m,Y etc)

wld be nice to have this in gui or even better integrated with date+time -> formats

jimbullington’s picture

Column ordering and date/time formatting is addressed in the 6.x-2.0 release which is in beta now.

jimbullington’s picture

Status: Active » Needs review
loophole080’s picture

tested beta 6x.2.0 (drupal core 6.16 & webform 6.x-3.0-beta5)

column sort and date formats, plus option to hide csv download link all working fine - nice work jim :-)

one small bug/issue is the date column sorts numerically rather than "naturally" in the report table, so i'm having to use YYYY/m/d to get correct sorting order by dates (when i'd like the new d/m/Y format instead)

jimbullington’s picture

The sorting problem should be corrected in the latest beta (beta2). Thanks for the feedback.

loophole080’s picture

StatusFileSize
new179.1 KB

hi jim

tried the new beta but date sorting doesn't seem right, at least for dd/mm/yyyy format

appears to be partially sorting... day's under 10 sort, months ignored, days over 10 sorted wrong relative to days under 10.... errr, have a look at the screen shot (that's supposed to be descending sort by date with d/m/y format) where i've tried to highlight the issues and probably makes more sense! :-)

cheers

jimbullington’s picture

OK - Thanks for the feedback. Apparently strtotime() is not as smart as I thought... I will try to get this fixed later today.

jimbullington’s picture

A new beta is awaiting...

loophole080’s picture

excellent! date sorting (d/m/y) working perfectly now :-)

vako’s picture

StatusFileSize
new63.2 KB

I am using the Beta 4 of WR and here's what's happening:
If I include the Date and Time on the Report Column, then the sorting works, however if I still want to sort it by the most recent entry and don't want to show the date/time columns, then it won't work even if I have the sorting criteria entered as Date and Time.
Please see attached image.

jimbullington’s picture

OK - I understand now - You are correct, that will not work at this time. I will try to have a patch to correct this in the next couple of days.

jimbullington’s picture

Version: 6.x-1.8 » 6.x-2.0-beta4
StatusFileSize
new13.25 KB

Please try the attached patch.

It is fairly complicated, but I think it will solve this problem.

It introduces hidden columns and the restriction that only report columns can be sorted.

So, in your case, you would add the column(s) to be sorted, mark them as hidden, then configure the sorts for those columns.

Sorry for the long delay. Please let me what you think.

vako’s picture

Thank you very much Jim. I am currently unable to test it immediately, but will definitely do it in the next few weeks.
Hope others will test it as well.

Coxen’s picture

Subscribe.

jimbullington’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

vako’s picture

Not sure if this code is in beta5, since it is now working for me. Thanks!