siemon_sun
21st June 2005, 07:28
Hi all,

I developed a customised report, its getting compiled but when i run it i get the following error:


"Error in reading sort file record, 3 fields scanned, 15 expected."

In the report input fields,the "Sort Mode" is "Ascending",if it is "Presorted",then no problem.

Why!!!???

Thanks advance.

beginer
21st June 2005, 07:57
Hi ,

Check out the no. of fields in the Input fields.
If possible remove some unwanted fields from Input fields.

günther
21st June 2005, 10:42
For "Ascending" sort mode, the report writes the data to a file *1), runs sort6.1 with appropriate parameters, and then reads in that file. The lines have to be split using string.scan$(), and here the problem occurs.

For "Presorted", the report uses the data *as is*, but knows that they are already sorted.

*1) Field separator is Ctrl-A or Ctrl-B, I'm not sure.

You could compile your report in debug mode, to see the generated code and to have a look at string.scan$() to see what happens.

Günther

jan van dillen
21st June 2005, 12:03
You should also check whether the language of the printed report is the same as the language for which you compiled the report.
If you add report fields to the report in language 2 and compile only language 2 but run the report in another language you will get runtime errors like the one you mentioned.

gurmeetmakkar
19th July 2007, 13:54
Hi all,

I developed a customised report, its getting compiled but when i run it i get the following error:


"Error in reading sort file record, 3 fields scanned, 15 expected."

In the report input fields,the "Sort Mode" is "Ascending",if it is "Presorted",then no problem.

Why!!!???

Thanks advance.



Please Create one more report.i think remove that problem

günther
19th July 2007, 14:17
If the data is "Presorted", the report does no sort by itself. If the data is to be sorted "Ascending" or "Descending", the report writes the data to a text file, calls sort6.1, and then reads the sorted file in.

The field separator is Control-B (ASCII 2). The line separator is Line Feed (ASCII 10). Sot your problem seems that some data contain one of these two characters.

Günther

bigjack
19th July 2007, 14:38
The following link may prove useful


http://www.baanboard.com/baanboard/showthread.php?t=27831&highlight=sort+file