Fields Case Sensitive
kolaboy
Member Posts: 446
Hi Experts,
I am presently finding my filtering of report to be case sensitive. I have to type Capital letters before my filter can work. If i type Small letters it does not work.
Can anyone tell me what to do to stop the case sensitivity on my report filters.
I want my report to filter without any case. i.e whether Capital letter or Small Letters it should not Matter,I want it to filter.
Can anyone help.
Regards
I am presently finding my filtering of report to be case sensitive. I have to type Capital letters before my filter can work. If i type Small letters it does not work.
Can anyone tell me what to do to stop the case sensitivity on my report filters.
I want my report to filter without any case. i.e whether Capital letter or Small Letters it should not Matter,I want it to filter.
Can anyone help.
Regards
0
Comments
-
0
-
Hi Waldo,
Your suggestion worked. But can i have it inside a code without writing it in front of the filter? i.e @lamin
This is because we want them to type any case to have the report work. Doing as you said can make their work tedious. they might even be forgetting to write the @ symbol.
Any idea.
Thanks0 -
You can use
MyRecord.SETFILTER(MyField,'@%1',MyFilter);
if users are entering values, orMyRecord.SETFILTER(MyField,'@'+MyFilter);
if users are entering filter.0 -
Hi Kine,
Whats wrong with this code
OnPreReport
@*EmployeeFilter := Employee.GETFILTERS;
If it is wrong , Can you please let me see the correct code and where should it be placed.
Thanks.0 -
getfilters returns all the filters for all the records.
the string looks like this.Amount: -100..100, Date: 010196..123196
so your code will not work.
you need to use getfilter for every field
EmployeeNoFilter := '@'+Employee.getfilter("No.");
Employee.setfilter("NO.",EmployeeNoFilter);
EmployeeNoFilter := '@'+Employee.getfilter("Name");
Employee.setfilter("Name",EmployeeNoFilter);
Something like that.0 -
Hi ara3n,
I have used your code but it is still not working. Below is your code:
EmployeeNoFilter := '@'+Employee.getfilter("No.");
Employee.setfilter("NO.",EmployeeNoFilter);
EmployeeNoFilter := '@'+Employee.getfilter("Name");
Employee.setfilter("Name",EmployeeNoFilter);
I put it on ; OnPreReport() trigger on the report form designer, but it did not work.
Can anyone tell me the problem. Did anyone have any code that can work?
Please any suggestion.
Regards.0 -
Filter must be set in OnPreDataItem else will be lost.0
-
Hi Kine,
I have put the code on OnPreDataItem(), but it is not still working. I have tried it in all the Possible places but it still did not work.
I am suspecting that the Code has a problem. I have modified the code in various possible ways, but it still not working too.
Did anyone have this problem before? Can anyone help Please.
Regards.0 -
It seems that problem will be somewhere else. You want to set the filter on some dataitem? If yes, be sure that you set the filter over correct "variable" (variable for the dataitem, or you can skip the variable and use the filter as if it is over Rec variable...)0
-
Hi Kine,
The filter have been set already and i can filter by any field in the employee table in the employee registration report[This is a new report i created], but the problem is i can only type capital letters to get my report coming out, but when i type small letters nothing comes out. This is why i suspect case sensitivity in Navision. I was thinking that you can have somewhere in Navision database where you can go and change it to case insensitive and i get my report in what ever case i type.
If that is not available, i try using code that can solve this, but i have still not found any code code that will solve it. I have used the one suggested by ara3n but it has not work yet. I was thinking if someone can look at it and see what might be wrong with it.
Any idea please.
Regards.0 -
It's not that you haven't found code to do what you need to do. It's that you don't seem to know what to do with the code and impliment it correctly.
I assume you can go the reverse way of typing in your filter into some textbox variable & making it uppercase at that point??
MyFinalFilter := UPPERCASE(TextBoxVariable);
then use setfilter, etc etc.
It sure seems alot easier to hit the "Cap Lock " button or type '@'.
0 -
kolaboy wrote:Hi Experts,
I am presently finding my filtering of report to be case sensitive. I have to type Capital letters before my filter can work. If i type Small letters it does not work.
Can anyone tell me what to do to stop the case sensitivity on my report filters.
I want my report to filter without any case. i.e whether Capital letter or Small Letters it should not Matter,I want it to filter.
Can anyone help.
Regards
Personally I think the thread is heading in the wrong direction. I think Harry is bringing a bit of the real world back to it. Its all a matter of opinion I guess, but I personally don't like to see someone writing code (especially if they are not sure how exactly to use this code), when simple user training can solve the issue.
The issue here starts with users filtering on text fields. This is a big no no in Navision, unless its just for add hock one off situations. Eg you are trying to do a quick hack report to print all items that have the word Blue in them, because some people wrote it wrong, and you want to clean up BLUE, Blue, blue so you filter @*blue*. But this is not something you do every day. If the users need to do it every day, then the report needs to be rethought our, and hopefully done using Code fields. If this user is on SQL, and is using anything other than 850 or 437, then the filters are going to be a huge performance drag on the system.
Now it gets worse, that if you write code on one report on say 10 fields that they want to filter on, you can be 100% certain that they client will come back and say the report does not work, because they want to filter on the eleventh field, and they will want the report fixed for free, AND they will start to think of this as a feature of Navision, and you will find yourselves for ever modifying reports for free.
So the reports that they run multiple times a day, need to be re thought out to filter AND SORT on code fields, and for the "one offs", train the users.
Please listen to Harry, he uses Navision every day, and really knows how to get the most out of it without coding like crazy.David Singleton0 -
Hi Experts,
Thank you all very much for your beautiful suggestions. they have really helped me a lot. I have now solved the problem and its working fine now. \:D/
Regards.0 -
kolaboy wrote:Hi Experts,
Thank you all very much for your beautiful suggestions. they have really helped me a lot. I have now solved the problem and its working fine now. \:D/
Regards.
So what was the solution in the end?David Singleton0 -
Hi Experts,
The Code that i used is as showned below:
IF Employee.GETFILTER("First Name") <> ''
THEN BEGIN
NameFilter := '@'+Employee.GETFILTER("First Name");
Employee.SETFILTER("First Name",NameFilter);
END;
IF Employee.GETFILTER("Last Name") <> ''
THEN BEGIN
LastNameFilter := '@'+Employee.GETFILTER("Last Name");
Employee.SETFILTER("Last Name",LastNameFilter);
END;
Regards.0 -
kolaboy wrote:Hi Experts,
The Code that i used is as showned below:
IF Employee.GETFILTER("First Name") <> ''
THEN BEGIN
NameFilter := '@'+Employee.GETFILTER("First Name");
Employee.SETFILTER("First Name",NameFilter);
END;
IF Employee.GETFILTER("Last Name") <> ''
THEN BEGIN
LastNameFilter := '@'+Employee.GETFILTER("Last Name");
Employee.SETFILTER("Last Name",LastNameFilter);
END;
Regards.
](*,) ](*,) ](*,) ](*,) ](*,)
What's the point #-oDavid Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions



