Retirement Notice
|
|
User login
|
|
Frontpage Sponsor
|
|
Poll
|
What do you expect from your SI Implementation partner for the success of ERP implementation. Bring best practices - Not to offer more CR's Leveraging standard functions 20% Need more honesty to work with the Users until their processes are fully mapped & Users are trained 40% Focus on process automation/ integrations/ Real time data/ BI analytics 13% Stick to basics 27% Total votes: 15 |
|
|
 |

19th January 2013, 20:50
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,503
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Error with Sort Field
Baan: ERP LN 6.1 FP7 C/S: Both
Hello Everyone,
I had a problems a few days back and I haved fixed it. I checked about it on board and found that many other people here have faced the same.
It was kind of this
HTML Code:
"Error in reading sort file record; 2 fields scanned;32 expected"
I found the following reasons for the problem.
Quote:
1. It occurs when we try to print a Text Field on report
e.g. tdsls400.txta
2. It doesnt show up until we use some sort in the layout.
3. It disappears when we change the sort field from "Ascending" to "Presorted".
|
I checked if there was any incorrect data, but did not found any. I was just curious to know, why does the error pops up?
What is the actual reason behind it?
For the ones who face this problem, just change the sort field from ascending to presorted and you are done.
Gurus, please share your views.
|

21st January 2013, 15:36
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,819
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
I believe there is more than one reason for the error. The only case I have run into the data was actually bad. If you run thru a report you will see what it does with the temp files and the sort, in my case the data was corrupted in the report file. Then when it came time to get the fields the separator was not correct causing it to read the wrong number of fields.
__________________
Mark
GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.
Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
|

21st January 2013, 16:08
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,503
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Agreed with you Mark. This problem has many reasons. But what I did not understood is the problem of keeping the field as "Ascending" / "Presorted".
I tried it with one more report today which had this text field and the same problem occured, which I resolved by changing the sort fields to "Presorted".
May be some secrets behind this 
|

21st January 2013, 18:25
|
Senior Member
|
|
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 199
|
|
Baan: Baan 4c4, 5C, LN -
DB: Informix, Oracle, SQL -
OS: HP UX, Win2K
|
Setting one or more fields to sorted in the input field writes all imported fields into a file/array using something similar to 'concat$', sorts them, then reads them back in order based on the sort field definitions using something similar to 'string.scan'. If your data contains one of the characters that the report uses internally to delimit the fields, you will receive the error since it stores the number of fields written to the sort file and posts the error message when the 'scan' call to return the fields does not find the same number of fields.
The condition that I have witnessed more than others that causes this is to pass a date field to the report that shows in the debugger as -1 = the result of an invalid call to "<something>".to.num" or "<something>".to.utc".
|

22nd January 2013, 11:08
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,503
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Interesting
Hi BaanInOhio,
That was interesting!! Never knew that .
So, this means, the only way to print text fields with some sort fields is to make them "Presorted".
|

22nd January 2013, 15:09
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,819
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
Not just text fields, but any fields that contain the separator character. The two cases I can remember was corrupted data in a string field - the session script was not clearing it correctly. The second case was with text, but where the user was cutting and pasting from word documents into BaaN text. The control characters caused errors and some of the text printed weird.
What it sounds like to me is your text has this control character in it - in my 4c4 system it was ctrl-B or STX. Not sure if it is the same for LN on windows.
__________________
Mark
GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.
Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
|

22nd January 2013, 18:26
|
Senior Member
|
|
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 199
|
|
Baan: Baan 4c4, 5C, LN -
DB: Informix, Oracle, SQL -
OS: HP UX, Win2K
|
The easiest way to break it is to send the invalid date (return argument of *.to date or *.to.utc = -1) to the report but text can also do it. I see this most in LN where users can copy and paste text from other sources (like word or a web page) where control characters and nulls are introduced. I have most frequently found that the "string.scan" for sorting in reports uses that backspace = control-B, chr$(8) as the field separator.
|

9th March 2023, 05:53
|
Newbie
|
|
Join Date: Jan 2016
Posts: 1
|
|
Baan: 10.4 -
DB: sql -
OS: unix
|
Error with Sort Field
The issue is identified. There is new line character in one of the text field. But how can it be resolved. Do I need to correct the record in GTM?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|