Sort Order
GCC Consulting
gccconsulting at comcast.net
Mon Jul 28 09:46:09 PDT 2008
> -----Original Message-----
> From: filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com
>
[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com]
On
> Behalf Of Chris Rendall
> Sent: Monday, July 28, 2008 11:24 AM
> To: filepro-list at lists.celestial.com
> Subject: Sort Order
>
> I have a report I want to print with two different sorts. Usually I just
create a
> separate report with the sort I need. I'd like to use the -RF flag to set
the sort
> order. The report I'm printing uses three fields to sort by. Can I use
the -RF flag
> if I need to sort on more than one field?
>
> Thanks,
> Chris
>
Chris,
Why not use -v sort/select processing to handle your option?
I see 2 way to do this.
1. use the -r command line option to pass the selected sort option
2. create a menu or listbox when the selection begins and allow the
user to select the sort wanted.
The sample below gives the option to sort the records either by zip code and
name or just names.
If you choose option 1 replace sl with @pm if you use -r on the command line
using the correct value set.
1 if: sl = ""
Then: GOTO start
2 Top if: sl = "1"
Then: sort1=zip_code;sort2=last_name;sort3(5,*)=first_name;end
3 if sl = "2"
Then: sort1=last_name;sort2(5,*)=first_name;end
4 Start if:
Then: dim how(3);how["1"]="By Zip Code";how["2"]="By
Name";how["3"]="Exit"
5 if:
Then: sl(1,.0,g)=listbox(how)
6 if: sl = "3"
Then: EXIT
7: if
Then: GOTO top
Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
More information about the Filepro-list
mailing list