> > > > Thanks Anders. > > > > I found the data table used for a cursor (I'm just learning vfp language so please excuse me if I'm writing nonsense) and now have a new question that's related. In our software program there is a form that triggers 4 reports. The same form is used for different purposes, such as receiving items or vendor invoices. Depending upon what data is in the table and what is entered in the form, the corresponding report runs while the others trigger a message saying there's not data to report. My question is if there is a way to sort one report, such as the vendor invoice report, while not changing the sort order of another report like a received item report. The code now reads SET ORDER TO TAG ordnum IN Poordedt_r so all the reports sort on that one field. I want to sort one report by "name" and not "ordnum". Is this possible and how?> > > > 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:> >

> > > (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 invnumSET ORDER TO TAG invnum IN Poordedt_rTHISFORM.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.