mibuso.com

Microsoft Business Solutions online community
It is currently Wed Jun 19, 2013 8:16 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: SETFILTER in SQL Database different with Native Database?
PostPosted: Mon Mar 26, 2012 5:49 pm 
Offline

Joined: Wed Aug 04, 2010 11:04 am
Posts: 4
Country: Vietnam (vn)
Hello everyone,

I have the issues below: When i release my report to Customer, they say that number in report is wrong, but when I backup database and restore to my laptop, I have the right number! After that, I know my customer run NAV with Native Database, I run with SQL Database, and I have the problem with SETFILTER command:
Code: Select all
GLEntry.SETFILTER("G/L Account No.",'<>131*');


- In Native Database, it return Data with G/L Account No: 13199
Image

- In SQL Database, it does not return Data with G/L Account No: 13199
Image

So, this is reason why Customer run report which return wrong number, but I run report return right number #-o

Has everyone had the problem yet?

Thanks.


Top
 Profile E-mail  
 
 Post subject: Re: SETFILTER in SQL Database different with Native Database
PostPosted: Mon Mar 26, 2012 6:13 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4252
Location: New Delhi
Country: India (in)
Check whether these posts are helpfull or not
http://www.mibuso.com/forum/viewtopic.php?t=18962
http://www.mibuso.com/forum/viewtopic.php?t=23219

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: SETFILTER in SQL Database different with Native Database
PostPosted: Mon Mar 26, 2012 10:16 pm 
Offline
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5317
Location: Prague
Country: Czech Republic (cz)
intelcore2quad88 wrote:
I have the issues below: When i release my report to Customer, they say that number in report is wrong, but when I backup database and restore to my laptop, I have the right number! After that, I know my customer run NAV with Native Database, I run with SQL Database, and I have the problem with SETFILTER command:


WRONG. Your issue is that you are developing in a different environment to that which your customer is using.

You must use the same versions for development and testing and live.

This is just one of many things that are different between the two databases.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject: Re: SETFILTER in SQL Database different with Native Database
PostPosted: Tue Mar 27, 2012 4:50 am 
Offline

Joined: Thu Dec 08, 2005 9:12 am
Posts: 2870
Location: India
Country: India (in)
As David suggested there is difference between the sorting of "Code" field in Native and SQL db.

_________________
CA Sandeep Singla
http://ssdynamics.co.in


Top
 Profile E-mail WWW  
 
 Post subject: Re: SETFILTER in SQL Database different with Native Database
PostPosted: Tue Mar 27, 2012 11:21 am 
Offline

Joined: Wed Aug 04, 2010 11:04 am
Posts: 4
Country: Vietnam (vn)
After I have tried some expression filter, I decide not to use : <>A*, because no expressions return right value in Native Database!
So I decide to choose another way.
This is my way:
Code: Select all
Before
1. GLE.SETFILTER("G/L Account No.",'<>A*&<>B*');
2. GLE.SETFILTER("G/L Account No.",'%1&%2','<>A*','<>B*');
2. GLE.SETFILTER("G/L Account No.",'<>%1&<>%2','A*','B*');
=> all are fail
After
Create new variable GLE2
1. GLE2.SETFILTER("G/L Account No.",'A*|B*'); //Get entry contain "G/L Account No." = A* or B*
2. IF GLE.FINDSET THEN REPEAT
       IF NOT GLE2.GET(GLE."Entry No.") THEN BEGIN
       ...........//Doing with entry no contain "G/L Account No." = A* or B*
       END;
    UNTIL GLE.NEXT = 0;
=> return right value


Thanks for everyone. :wink:


Top
 Profile E-mail  
 
 Post subject: Re: SETFILTER in SQL Database different with Native Database
PostPosted: Tue Mar 27, 2012 3:24 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7523
Location: Milan
Country: Italy (it)
SETFILTER("...",'<>XYZ*'); does work on SQL but on native it doesn't work.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: