I wondered if anyone could help me, i have a date filter on a report that i pass over to another report as text. With this i then want to automatically set the date filter on the second report. When i have it as text is there a quick way that i can convert this to a date filter so that i can select the max date from the filter?
0
Comments
...or do you want to achieve something else? :-k
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Technical Consultant, MS Dynamics NAV
I have a variable of type text DateFilterStr, and if I put 't' or 'w' ('t'- for TODAY, and 'w' for Work Date) and use this function
"Salesperson/Purchaser".SETFILTER("Salesperson/Purchaser"."Date Filter",DateFilterStr);
DateFilterStr:= "Salesperson/Purchaser".GETFILTER("Salesperson/Purchaser"."Date Filter");
it doesn't displays the Today -t or Work Date -w, but it displays strange dates.
Let's say that Today=15/11/2012, and Work Date =15/11/2012 , when i put in this field 't' it returns date 13/11/2012, when i put 'w' it returns date 14/11/2012. If i change the Work date to '01/01/2012', and pres 't' or 'w' it returns dates 27/12/2011 for 't' and 28/11/2011 for 'w'.
DateFormat (dd/MM/yyyy)
Any suggestions why?
Thanks,
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
That's it. I have tested it to diferent dates, and it returns t=tuesday and w=wednesday within that week of Work Date.
You can use all letter of day, or just the first letter. Also if you put 'Sunday' it returns date of that Sunday.
strange!!! isn't?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog