Hi,
I am writing a report and setting a Date Filter.
however in my code I have
SETFILTER("Order Date",'%1..%2',StartDate,EndDate);
This works for the following
05/05/08
05/05/08..30/06/08
Is it possible to write the code so that I can also use it for the following
<05/05/08
>05/05/08
Also
If :I have an option field on a table and I want to setrange on 2 specific options. how is it done?
hoping you can help
0
Comments
SETFILTER("Order Date",'<%1|>%2',StartDate,EndDate);
for (all dates Not equal to StartDate)
SETFILTER("Order Date",'<>%1',StartDate);
Technical Consultant, MS Dynamics NAV
but when the user runs the report.
how can we check which option the user entered into the date filter?
example if user types >310608
how does the code know that thats what he typed?
filters can be applied on fields by setting field(s)'s name in [ReqFilterFields] property of the dataItem of report.
there user can input all combination of date filters. how to input the date filter..?? Please see help.
Technical Consultant, MS Dynamics NAV
You can get (and then print) what is filtered by using the GETFILTER function which returns a string of the filter. To set a filter you can do as Sandeep suggests
Hope this helps
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
correctfitlerstring := GETFILTER("Date Filter");
If you have added a field to the options tab that is a date filter, consider instead adding a flowfilter to your table, called Date Filter, and then using the above code to properly filter by date. It is a lot easier because Navision does the work for you.
-a