>Hi All
>I've got a table driven Report shell form that I would like to add the capability to change a reports sort sequence at run-time (after selecting a report). Possibly click on a button to open a grid form showing all the Indexes available for the report selected. The user would click on the Index desired and click a close button. Then the form would sort the Cursor using the Index selected.
>Has anyone done this in vfp9?
No, I've done this in FPD2.6 :)
Essentially, I had three combos, where they could pick the first, second and third order field (out of four or five possible fields). The fields selected in the first would be grayed out in the second and third, and one selected in the second would also be grayed out in the third.
Then, based on the selection, I'd do a
select * from ... order by &fld1, &fld2, &fld3
and in the report itself, the outer group by expression was eval(fld1), middle eval(fld2), inner eval(fld2). The captions in group header and footer were composed using "total for "+fldname1+" "+fld1 etc.