Dear all,
How do I prevent user from selecting specific data in report filter ?
Eg :
If I open Whse.Shipment Status, for field location I already filter in location list form to only show Location code 'GREEN' and 'BLUE'.
But if user manually type 'WHITE' value in location code field, the report can still running. How do I prevent this ?
Thanks In Advanced
0
Comments
Overrule the filter of the user by putting some code in the OnPreDataItem-section of the report.
Something like
SETFILTER("Location Code",'Your Filter');
Probably you did something like this in the form.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
@Kriki, what if I want to show error message if the user put invalid value (unlike in the table that already limited by filter) ? By using the code you provide, it would force the data to filter by the value I entered.
@kine, I already limit the location user can see, but I can't stop user from input manually other value beside the one that can be seen by them.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
In stead of overwriting the filter (or like kine wrote:putting it in anther filtergroup), you can test if the filter the user has put is valid and if not just give an ERROR.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
hi, sorry, i'm still newbie in navision, i'm a little bit confused when reading "add it into another filter group", could you kindly described it to me what is this mean ? thx
@kriki
"you can test if the filter the user has put is valid"
How do I get the value that user input ? Cause if i just put code :
Message("location code"), it gives me empty string, even when I alread put the value in the filter.
Thx
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
thx a lot, after browse this forum, I finally understand the meaning, and able to solve my problems.
Thanks to you all