Neal Matthews
25th March 2003, 17:05
Hello,
I'm amending Print Sales Schedule By Customer print so that I can sort it by Planner, Cust , Del and Item.
I've taken the presorts out of the report and just put ascending sorts on the four fields mentioned.
However I cannot get the report to sort by planner it just continues to sort on the presorts even if I take out the other sorts and just leave the planner sort active.
I would guess the program script is doing something I do not understand and cannot see as I do not have the source.
Does anybody have any ideas how to get round this ?
Regards
Neal Matthews
Intier Automotive - IT Support Analyst
steveauckly
25th March 2003, 18:03
Is it possible the original report is in shared memory? This would cause your updates to not taken effect.
kevobr
25th March 2003, 18:23
The report sorting will always resort the data according to the sort fields no matter how the program sent it.
Compile the report in debug to check if you are using your changed version at runtime.
Neal Matthews
25th March 2003, 18:56
Hello,
The report is definately not loaded into shared memory and I am definately using my version.
Is it possible that as I've had to add the planner field into the report tiitm001.cplb it cannot use this as the primary sort key.
Cheers
Neal
steveauckly
25th March 2003, 18:59
What is probably happening is the session is not getting the field you added, therefore they are all blank. Thus, sorting will not change the order of the records which is why you are getting the same as the presorted fields.
steveauckly
25th March 2003, 19:02
I submitted that last post too soon.
A possible workaround would be to get the planner yourself in the after.receive.data section of the report script. I believe it is still possible to sort, but I'm not 100% sure. Anyone know for sure.
Neal Matthews
25th March 2003, 20:40
Thanks Steve,
I've seen after.receive.data mentioned in other posts I'll have to hunt around for some further info.
Cheers
Neal
Neal Matthews
1st April 2003, 10:00
Just to finish this one off.
I couldn't get after.receive.data to work either so I changed tack.
Instead of sorting by planner I took the planner range off my form and just allowed selection of a single planner.
I then just printed the records for the single planner.
Cheating a bit I know but the user was happy enough.
Cheers
Neal
mark_h
1st April 2003, 16:23
In reply to Steves question - yes you can use the after.receive.data to change the sort. You can read this post (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1908) on the after.receive.data. Not sure why it did not work for you, but it is possible.
Mark
Neal Matthews
1st April 2003, 18:09
Thanks for pointing me in the right direction Mark.
I'll have a good look at the previous post.