Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: steve sheridan
  Where is steve sheridan?
 hayward
 California - United States
 steve sheridan
 Tags
Subject: RE: Changing sort orders on cursors in a rep
Thread ID: 253976 Message ID: 310720 # Views: 31 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Thursday, June 23, 2011 8:04:10 PM         
   


> >
> > Yes, it is. Details would depend on how the data are currently prepared, i.e. what approach among those Anders mentioned already is being used.
> > As a guess, your description sounds as if there are table(s) being open having certain alias name(s).
> > So that if there is a "Set Order To ..." line probably right before the four "Report Form ..." lines, you can change each report data order by adding three additional "Set Order To ..." lines:
> >
> >
* assumed the current code looks like:
> > ...
> > Set Order To indexTagA
> > Report Form reportA ...
> > Report Form reportB ...
> > Report Form reportC ...
> > Report Form reportD ...
> > ...
> > 
> > * ... the modified code might look like
> > ...
> > Set Order To indexTagA
> > Report Form reportA ...
> > Set Order To indexTagB
> > Report Form reportB ...
> > Set Order To indexTagC
> > Report Form reportC ...
> > Set Order To indexTagD
> > Report Form reportD ...
> > ...
> > 

> >
> >
> > (If the ordered alias is being used elsewhere too, as opposed to a temporary report-only data result, there might be an additional "Set Order To previousOrder" at the bottom.)
> >
> >
> >
> > hth
> > -Stefan
>
> I got it to work Stefan, thank you! I had to add another line of code that I copied from earlier in the form so it looked like this:
>
> INDEX ON invnum TAG invnum
> SET ORDER TO TAG invnum IN Poordedt_r
> THISFORM.ReportName='podtljnl.frx'
>
> I couldn't get it to sort by vendor name as the column containing the data is entitled "name" and I'm assuming there is a command by the same word as I got an error message when I tried this:
>
> SET ORDER TO TAG name, invnum IN Poordedt_r
>
> The report works as is because vendor invoice numbers have different sequences but I'd still like to learn more, of course.


SET ORDER TO TAG name, invnum IN Poordedt_

You can only set order to one tag at a time, not to a comma-delimited list of tags.

-Anders

ENTIRE THREAD

Changing sort orders on cursors in a rep Posted by Neil Phelan @ 2/18/2010 1:28:40 PM
RE: Changing sort orders on cursors in a rep Posted by ho me @ 2/18/2010 2:44:57 PM
RE: Changing sort orders on cursors in a rep Posted by Stefan Wuebbe @ 2/18/2010 4:57:08 PM
RE: Changing sort orders on cursors in a rep Posted by ho me @ 2/19/2010 6:48:14 AM
RE: Changing sort orders on cursors in a rep Posted by Anders Altberg @ 2/19/2010 11:56:11 AM
RE: Changing sort orders on cursors in a rep Posted by steve sheridan @ 6/21/2011 6:31:14 PM
RE: Changing sort orders on cursors in a rep Posted by Anders Altberg @ 6/21/2011 6:50:20 PM
RE: Changing sort orders on cursors in a rep Posted by steve sheridan @ 6/22/2011 1:20:23 AM
RE: Changing sort orders on cursors in a rep Posted by Stefan Wuebbe @ 6/22/2011 9:35:23 AM
RE: Changing sort orders on cursors in a rep Posted by steve sheridan @ 6/22/2011 8:00:15 PM
RE: Changing sort orders on cursors in a rep Posted by steve sheridan @ 6/23/2011 5:26:58 PM
RE: Changing sort orders on cursors in a rep Posted by Anders Altberg @ 6/23/2011 8:04:10 PM
RE: Changing sort orders on cursors in a rep Posted by Stefan Wuebbe @ 6/24/2011 5:56:54 AM
RE: Changing sort orders on cursors in a rep Posted by steve sheridan @ 7/13/2011 11:17:42 PM
RE: Changing sort orders on cursors in a rep Posted by Stefan Wuebbe @ 7/14/2011 5:58:41 AM