PDA

View Full Version : RC II date filter



Bob Worsley
19-Feb-2010, 10:53 AM
Has anyone gotten a date range filter to work in the RC II VRW? i.e.
myfile.date >= 01/01/2009
myfile.date <= 01/01/2010

I've tried a couple of different date formats but can't get any data to preview even when I know the date is well within the range.

Michael Mullan
19-Feb-2010, 01:27 PM
Bob and I have been collaborating on this error, and for both of us..

1. An individual date filter works fine in the VRW application.
2. An individual date filter DOES NOT work, in a VDF program, calling a VRW report.
2. there seems to be no way to create a "between a and B" date range filter in VRW
.....There is no "between" choice.
.....Adding any two filters on the same field causes the report to reject all records.

Bob Worsley
22-Feb-2010, 10:57 AM
I haven't seen any response from DAW on this and it's kind of critical to me, is it a bug or something on the "to-do" list for post release?

Vincent Oorsprong
22-Feb-2010, 12:08 PM
Bob,

It has been fixed. Sorry.

craigkrum
22-Feb-2010, 04:07 PM
I don't seem to be able to get any date filtering to work, even single parameter ones. I'm trying to use a date filter in my subreports filter function but no matter what I put there it seems to allow all records through. I am using the format:

dim gdTestDate is global
return ({file.test_date}=gdTestDate)

I can see that gdTestDate has the correct value by showing on the report, but even if file.test_date is something completely different it still acts as if the values match and allows the record through.

Any ideas?

Bob Worsley
22-Feb-2010, 04:35 PM
the only way I got it to work was: file.date >= 01/12/2010

But when I tried two dates to get a range it failed.

craigkrum
22-Feb-2010, 06:27 PM
I have not been able to make any version of "file.date <some comparison> dDate" work. I finally switched to the following and it seems to work fine:

let iDays1 = datediff("d",cdate("01/01/2009"),{myfile.date}) //Lower date range
let iDays2 = datediff("d",cdate("01/01/2010"),{myfile.date}) //Upper date range
if ((iDays1>=0) and (iDays2<=0)) then
return true
else
return false
end

If there are examples of using direct date-to-date comparisons that work, I would love to see them.
Also, it seems you can't use a compound boolean as a return value for a function, such as:

return ((iDays1>=0) and (iDays2<=0))

Bob Worsley
22-Feb-2010, 07:33 PM
I just used the filter expert

Ulbe Stellema
22-Feb-2010, 07:39 PM
FYI, we are working on fixing the date filters (both the 'Filter Expert' and the 'Filter function'). Fix is currently being tested.

Bob Worsley
22-Feb-2010, 09:43 PM
Don't let all the whining slow you down any... :D

Michael Mullan
22-Feb-2010, 10:30 PM
Tested the Fix Ulbe is working on, and it works for me. I tested VDF integration, which does work.
Tuesday I'll test the fix actually in VRW.